11 Aug, 2010

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (96 commits)
    no need for list_for_each_entry_safe()/resetting with superblock list
    Fix sget() race with failing mount
    vfs: don't hold s_umount over close_bdev_exclusive() call
    sysv: do not mark superblock dirty on remount
    sysv: do not mark superblock dirty on mount
    btrfs: remove junk sb_dirt change
    BFS: clean up the superblock usage
    AFFS: wait for sb synchronization when needed
    AFFS: clean up dirty flag usage
    cifs: truncate fallout
    mbcache: fix shrinker function return value
    mbcache: Remove unused features
    add f_flags to struct statfs(64)
    pass a struct path to vfs_statfs
    update VFS documentation for method changes.
    All filesystems that need invalidate_inode_buffers() are doing that explicitly
    convert remaining ->clear_inode() to ->evict_inode()
    Make ->drop_inode() just return whether inode needs to be dropped
    fs/inode.c:clear_inode() is gone
    fs/inode.c:evict() doesn't care about delete vs. non-delete paths now
    ...

    Fix up trivial conflicts in fs/nilfs2/super.c

    Linus Torvalds
     

10 Aug, 2010

2 commits


08 Aug, 2010

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
    [DNS RESOLVER] Minor typo correction
    DNS: Fixes for the DNS query module
    cifs: Include linux/err.h for IS_ERR and PTR_ERR
    DNS: Make AFS go to the DNS for AFSDB records for unknown cells
    DNS: Separate out CIFS DNS Resolver code
    cifs: account for new creduid=0x%x parameter in spnego upcall string
    cifs: reduce false positives with inode aliasing serverino autodisable
    CIFS: Make cifs_convert_address() take a const src pointer and a length
    cifs: show features compiled in as part of DebugData
    cifs: update README

    Fix up trivial conflicts in fs/cifs/cifsfs.c due to workqueue changes

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (55 commits)
    workqueue: mark init_workqueues() as early_initcall()
    workqueue: explain for_each_*cwq_cpu() iterators
    fscache: fix build on !CONFIG_SYSCTL
    slow-work: kill it
    gfs2: use workqueue instead of slow-work
    drm: use workqueue instead of slow-work
    cifs: use workqueue instead of slow-work
    fscache: drop references to slow-work
    fscache: convert operation to use workqueue instead of slow-work
    fscache: convert object to use workqueue instead of slow-work
    workqueue: fix how cpu number is stored in work->data
    workqueue: fix mayday_mask handling on UP
    workqueue: fix build problem on !CONFIG_SMP
    workqueue: fix locking in retry path of maybe_create_worker()
    async: use workqueue for worker pool
    workqueue: remove WQ_SINGLE_CPU and use WQ_UNBOUND instead
    workqueue: implement unbound workqueue
    workqueue: prepare for WQ_UNBOUND implementation
    libata: take advantage of cmwq and remove concurrency limitations
    workqueue: fix worker management invocation without pending works
    ...

    Fixed up conflicts in fs/cifs/* as per Tejun. Other trivial conflicts in
    include/linux/workqueue.h, kernel/trace/Kconfig and kernel/workqueue.c

    Linus Torvalds
     

06 Aug, 2010

1 commit

  • Separate out the DNS resolver key type from the CIFS filesystem into its own
    module so that it can be made available for general use, including the AFS
    filesystem module.

    This facility makes it possible for the kernel to upcall to userspace to have
    it issue DNS requests, package up the replies and present them to the kernel
    in a useful form. The kernel is then able to cache the DNS replies as keys
    can be retained in keyrings.

    Resolver keys are of type "dns_resolver" and have a case-insensitive
    description that is of the form "[:]". The optional
    indicates the particular DNS lookup and packaging that's required. The
    is the query to be made.

    If isn't given, a basic hostname to IP address lookup is made, and the
    result is stored in the key in the form of a printable string consisting of a
    comma-separated list of IPv4 and IPv6 addresses.

    This key type is supported by userspace helpers driven from /sbin/request-key
    and configured through /etc/request-key.conf. The cifs.upcall utility is
    invoked for UNC path server name to IP address resolution.

    The CIFS functionality is encapsulated by the dns_resolve_unc_to_ip() function,
    which is used to resolve a UNC path to an IP address for CIFS filesystem. This
    part remains in the CIFS module for now.

    See the added Documentation/networking/dns_resolver.txt for more information.

    Signed-off-by: Wang Lei
    Signed-off-by: David Howells
    Acked-by: Jeff Layton
    Signed-off-by: Steve French

    Wang Lei
     

02 Aug, 2010

2 commits

  • Define inode-level data storage objects (managed by cifsInodeInfo structs).
    Each inode-level object is created in a super-block level object and is itself
    a data storage object in to which pages from the inode are stored.

    The inode object is keyed by UniqueId. The coherency data being used is
    LastWriteTime, LastChangeTime and end of file reported by the server.

    Signed-off-by: Suresh Jayaraman
    Signed-off-by: Steve French

    Suresh Jayaraman
     
  • Define CIFS for FS-Cache and register for caching. Upon registration the
    top-level index object cookie will be stuck to the netfs definition by
    FS-Cache.

    Signed-off-by: Suresh Jayaraman
    Signed-off-by: Steve French

    Suresh Jayaraman
     

23 Jul, 2010

2 commits

  • Workqueue can now handle high concurrency. Use system_nrt_wq
    instead of slow-work.

    * Updated is_valid_oplock_break() to not call cifs_oplock_break_put()
    as advised by Steve French. It might cause deadlock. Instead,
    reference is increased after queueing succeeded and
    cifs_oplock_break() briefly grabs GlobalSMBSeslock before putting
    the cfile to make sure it doesn't put before the matching get is
    finished.

    * Anton Blanchard reported that cifs conversion was using now gone
    system_single_wq. Use system_nrt_wq which provides non-reentrance
    guarantee which is enough and much better.

    Signed-off-by: Tejun Heo
    Acked-by: Steve French
    Cc: Anton Blanchard

    Tejun Heo
     
  • Fix the security problem in the CIFS filesystem DNS lookup code in which a
    malicious redirect could be installed by a random user by simply adding a
    result record into one of their keyrings with add_key() and then invoking a
    CIFS CFS lookup [CVE-2010-2524].

    This is done by creating an internal keyring specifically for the caching of
    DNS lookups. To enforce the use of this keyring, the module init routine
    creates a set of override credentials with the keyring installed as the thread
    keyring and instructs request_key() to only install lookup result keys in that
    keyring.

    The override is then applied around the call to request_key().

    This has some additional benefits when a kernel service uses this module to
    request a key:

    (1) The result keys are owned by root, not the user that caused the lookup.

    (2) The result keys don't pop up in the user's keyrings.

    (3) The result keys don't come out of the quota of the user that caused the
    lookup.

    The keyring can be viewed as root by doing cat /proc/keys:

    2a0ca6c3 I----- 1 perm 1f030000 0 0 keyring .dns_resolver: 1/4

    It can then be listed with 'keyctl list' by root.

    # keyctl list 0x2a0ca6c3
    1 key in keyring:
    726766307: --alswrv 0 0 dns_resolver: foo.bar.com

    Signed-off-by: David Howells
    Reviewed-and-Tested-by: Jeff Layton
    Acked-by: Steve French
    Signed-off-by: Linus Torvalds

    David Howells
     

12 Jun, 2010

1 commit

  • The standard behavior for drop_inode is to delete the inode when the
    last reference to it is put and the nlink count goes to 0. This helps
    keep inodes that are still considered "not deleted" in cache as long as
    possible even when there aren't dentries attached to them.

    When server inode numbers are disabled, it's not possible for cifs_iget
    to ever match an existing inode (since inode numbers are generated via
    iunique). In this situation, cifs can keep a lot of inodes in cache that
    will never be used again.

    Implement a drop_inode routine that deletes the inode if server inode
    numbers are disabled on the mount. This helps keep the cifs inode
    caches down to a more manageable size when server inode numbers are
    disabled.

    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     

14 May, 2010

1 commit


12 May, 2010

1 commit

  • CIFS has stubs for XFS-style quotas without an actual implementation backing
    them, hidden behind a config option not visible in Kconfig. Remove these
    stubs for now as the quota operations will see some major changes and this
    code simply gets in the way.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Jeff Layton
    Signed-off-by: Jan Kara
    Signed-off-by: Steve French

    Steve French
     

06 May, 2010

1 commit


27 Apr, 2010

2 commits


22 Apr, 2010

1 commit


21 Apr, 2010

1 commit

  • Neaten cERROR and cFYI macros, reduce text space
    ~2.5K

    Convert '__FILE__ ": " fmt' to '"%s: " fmt', __FILE__' to save text space
    Surround macros with do {} while
    Add parentheses to macros
    Make statement expression macro from macro with assign
    Remove now unnecessary parentheses from cFYI and cERROR uses

    defconfig with CIFS support old
    $ size fs/cifs/built-in.o
    text data bss dec hex filename
    156012 1760 148 157920 268e0 fs/cifs/built-in.o

    defconfig with CIFS support old
    $ size fs/cifs/built-in.o
    text data bss dec hex filename
    153508 1760 148 155416 25f18 fs/cifs/built-in.o

    allyesconfig old:
    $ size fs/cifs/built-in.o
    text data bss dec hex filename
    309138 3864 74824 387826 5eaf2 fs/cifs/built-in.o

    allyesconfig new
    $ size fs/cifs/built-in.o
    text data bss dec hex filename
    305655 3864 74824 384343 5dd57 fs/cifs/built-in.o

    Signed-off-by: Joe Perches
    Signed-off-by: Steve French

    Joe Perches
     

27 Mar, 2010

1 commit


10 Mar, 2010

1 commit

  • ...to allow updating inode attributes on an existing inode by
    filehandle. Change mmap and llseek codepaths to use that
    instead of cifs_revalidate_dentry since they have a filehandle
    readily available.

    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     

06 Mar, 2010

1 commit

  • cifs_revalidate is renamed to cifs_revalidate_dentry as a later patch
    will add a by-filehandle variant.

    Add a new "invalid_mapping" flag to the cifsInodeInfo that indicates
    that the pagecache is considered invalid. Add a new routine to check
    inode attributes whenever they're updated and set that flag if the inode
    has changed on the server.

    cifs_revalidate_dentry is then changed to just update the attrcache if
    needed and then to zap the pagecache if it's not valid.

    There are some other behavior changes in here as well. Open files are
    now allowed to have their caches invalidated. I see no reason why we'd
    want to keep stale data around just because a file is open. Also,
    cifs_revalidate_cache uses the server_eof for revalidating the file
    size since that should more closely match the size of the file on the
    server.

    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     

07 Dec, 2009

1 commit


21 Nov, 2009

1 commit

  • As of the patch:

    SLOW_WORK: Wait for outstanding work items belonging to a module to clear

    Wait for outstanding slow work items belonging to a module to clear
    when unregistering that module as a user of the facility. This
    prevents the put_ref code of a work item from being taken away before
    it returns.

    slow_work_register_user() takes a module pointer as an argument. CIFS must now
    pass THIS_MODULE as that argument, lest the following error be observed:

    fs/cifs/cifsfs.c: In function 'init_cifs':
    fs/cifs/cifsfs.c:1040: error: too few arguments to function 'slow_work_register_user'

    Signed-off-by: David Howells

    David Howells
     

27 Sep, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
    cifs: fix locking and list handling code in cifs_open and its helper
    [CIFS] Remove build warning
    cifs: fix problems with last two commits
    [CIFS] Fix build break when keys support turned off
    cifs: eliminate cifs_init_private
    cifs: convert oplock breaks to use slow_work facility (try #4)
    cifs: have cifsFileInfo hold an extra inode reference
    cifs: take read lock on GlobalSMBSes_lock in is_valid_oplock_break
    cifs: remove cifsInodeInfo.oplockPending flag
    cifs: fix oplock request handling in posix codepath
    [CIFS] Re-enable Lanman security

    Linus Torvalds
     

25 Sep, 2009

2 commits

  • Acked-by: Jeff Layton
    Signed-off-by: Steve French

    Steve French
     
  • This is the fourth respin of the patch to convert oplock breaks to
    use the slow_work facility.

    A customer of ours was testing a backport of one of the earlier
    patchsets, and hit a "Busy inodes after umount..." problem. An oplock
    break job had raced with a umount, and the superblock got torn down and
    its memory reused. When the oplock break job tried to dereference the
    inode->i_sb, the kernel oopsed.

    This patchset has the oplock break job hold an inode and vfsmount
    reference until the oplock break completes. With this, there should be
    no need to take a tcon reference (the vfsmount implicitly holds one
    already).

    Currently, when an oplock break comes in there's a chance that the
    oplock break job won't occur if the allocation of the oplock_q_entry
    fails. There are also some rather nasty races in the allocation and
    handling these structs.

    Rather than allocating oplock queue entries when an oplock break comes
    in, add a few extra fields to the cifsFileInfo struct. Get rid of the
    dedicated cifs_oplock_thread as well and queue the oplock break job to
    the slow_work thread pool.

    This approach also has the advantage that the oplock break jobs can
    potentially run in parallel rather than be serialized like they are
    today.

    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     

24 Sep, 2009

1 commit

  • Most call sites of unload_nls() do:
    if (nls)
    unload_nls(nls);

    Check the pointer inside unload_nls() like we do in kfree() and
    simplify the call sites.

    Signed-off-by: Thomas Gleixner
    Cc: Steve French
    Cc: OGAWA Hirofumi
    Cc: Roman Zippel
    Cc: Dave Kleikamp
    Cc: Petr Vandrovec
    Cc: Anton Altaparmakov
    Signed-off-by: Al Viro

    Thomas Gleixner
     

22 Sep, 2009

1 commit


02 Sep, 2009

2 commits

  • Right now, the GlobalOplock_Q is protected by the GlobalMid_Lock. That
    lock is also used for completely unrelated purposes (mostly for managing
    the global mid queue). Give the list its own dedicated spinlock
    (cifs_oplock_lock) and rename the list to cifs_oplock_list to
    eliminate the camel-case.

    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     
  • Minor nit: we already have a tcon pointer so we don't need to
    dereference cifs_sb again.

    Also initialize the vars in the declaration.

    Reported-by: Peter Staubach
    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     

04 Aug, 2009

1 commit


10 Jul, 2009

1 commit

  • cifs: remove cifsInodeInfo->inUse counter

    It was purported to be a refcounter of some sort, but was never
    used that way. It never served any purpose that wasn't served equally well
    by the I_NEW flag.

    Signed-off-by: Jeff Layton
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Steve French

    Jeff Layton
     

26 Jun, 2009

1 commit

  • The lock_kernel call moved into the fs for umount_begin
    is not needed. This adds a check to make sure we don't
    call umount_begin twice on the same fs.

    umount_begin for cifs is probably not needed and
    may eventually be able to be removed, but in
    the meantime this smaller patch is safe and
    gets rid of the bkl from this path which provides
    some benefit.

    Acked-by: Jeff Layton
    Signed-off-by: Steve French

    Steve French
     

25 Jun, 2009

1 commit


15 Jun, 2009

1 commit


13 Jun, 2009

2 commits


12 Jun, 2009

1 commit

  • Move BKL into ->put_super from the only caller. A couple of
    filesystems had trivial enough ->put_super (only kfree and NULLing of
    s_fs_info + stuff in there) to not get any locking: coda, cramfs, efs,
    hugetlbfs, omfs, qnx4, shmem, all others got the full treatment. Most
    of them probably don't need it, but I'd rather sort that out individually.
    Preferably after all the other BKL pushdowns in that area.

    [AV: original used to move lock_super() down as well; these changes are
    removed since we don't do lock_super() at all in generic_shutdown_super()
    now]
    [AV: fuse, btrfs and xfs are known to need no damn BKL, exempt]

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     

28 May, 2009

1 commit


09 May, 2009

1 commit