04 Jan, 2012

1 commit


02 Nov, 2011

1 commit


23 Oct, 2011

1 commit


17 Oct, 2011

1 commit

  • Now build security descriptor to change either owner or group at the
    server. Initially security descriptor was built to change only
    (D)ACL, that functionality has been extended.

    When either an Owner or a Group of a file object at the server is changed,
    rest of security descriptor remains same (DACL etc.).

    To set security descriptor, it is necessary to open that file
    with permission bits of either WRITE_DAC if DACL is being modified or
    WRITE_OWNER (Take Ownership) if Owner or Group is being changed.

    It is the server that decides whether a set security descriptor with
    either owner or group change succeeds or not.

    Signed-off-by: Shirish Pargaonkar
    Signed-off-by: Steve French

    Shirish Pargaonkar
     

05 Aug, 2011

1 commit

  • Regression from 2.6.39...

    The delimiters in the prefixpath are not being converted based on
    whether posix paths are in effect. Fixes:

    https://bugzilla.redhat.com/show_bug.cgi?id=727834

    Reported-and-Tested-by: Iain Arnell
    Reported-by: Patrick Oltmann
    Cc: Pavel Shilovsky
    Cc: stable@kernel.org
    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     

27 May, 2011

4 commits

  • secMode to sec_mode
    and
    cifsTconInfo to cifs_tcon
    and
    cifsSesInfo to cifs_ses

    Signed-off-by: Steve French

    Steve French
     
  • Add rwpidforward mount option that switches on a mode when we forward
    pid of a process who opened a file to any read and write operation.

    This can prevent applications like WINE from failing on read or write
    operation on a previously locked file region from the same netfd from
    another process if we use mandatory brlock style.

    It is actual for WINE because during a run of WINE program two processes
    work on the same netfd - share the same file struct between several VFS
    fds:
    1) WINE-server does open and lock;
    2) WINE-application does read and write.

    Signed-off-by: Pavel Shilovsky
    Signed-off-by: Steve French

    Pavel Shilovsky
     
  • Now we point superblock to a server share root and set a root dentry
    appropriately. This let us share superblock between mounts like
    //server/sharename/foo/bar and //server/sharename/foo further.

    Reviewed-by: Jeff Layton
    Signed-off-by: Pavel Shilovsky

    Signed-off-by: Steve French

    Steve French
     
  • We need it to make them work with mandatory locking style because
    we can fail in a situation like when kernel need to flush dirty pages
    and there is a lock held by a process who opened file.

    Signed-off-by: Pavel Shilovsky
    Signed-off-by: Steve French

    Pavel Shilovsky
     

21 May, 2011

1 commit


19 May, 2011

3 commits


21 Jan, 2011

1 commit

  • Invalidate inode mapping if we don't have at least Level II oplock in
    cifs_strict_fsync. Also remove filemap_write_and_wait call from cifs_fsync
    because it is previously called from vfs_fsync_range. Add file operations'
    structures for strict cache mode.

    Reviewed-by: Jeff Layton
    Signed-off-by: Pavel Shilovsky
    Signed-off-by: Steve French

    Pavel Shilovsky
     

16 Jan, 2011

1 commit


13 Jan, 2011

1 commit


10 Jan, 2011

1 commit


07 Jan, 2011

4 commits

  • dcache_inode_lock can be replaced with per-inode locking. Use existing
    inode->i_lock for this. This is slightly non-trivial because we sometimes
    need to find the inode from the dentry, which requires d_inode to be
    stabilised (either with refcount or d_lock).

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Reduce some branches and memory accesses in dcache lookup by adding dentry
    flags to indicate common d_ops are set, rather than having to check them.
    This saves a pointer memory access (dentry->d_op) in common path lookup
    situations, and saves another pointer load and branch in cases where we
    have d_op but not the particular operation.

    Patched with:

    git grep -E '[.>]([[:space:]])*d_op([[:space:]])*=' | xargs sed -e 's/\([^\t ]*\)->d_op = \(.*\);/d_set_d_op(\1, \2);/' -e 's/\([^\t ]*\)\.d_op = \(.*\);/d_set_d_op(\&\1, \2);/' -i

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • dcache_lock no longer protects anything. remove it.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Add a new lock, dcache_inode_lock, to protect the inode's i_dentry list
    from concurrent modification. d_alias is also protected by d_lock.

    Signed-off-by: Nick Piggin

    Nick Piggin
     

08 Dec, 2010

1 commit

  • It's possible that cifs_mount will call cifs_build_path_to_root on a
    newly instantiated cifs_sb. In that case, it's likely that the
    master_tlink pointer has not yet been instantiated.

    Fix this by having cifs_build_path_to_root take a cifsTconInfo pointer
    as well, and have the caller pass that in.

    Reported-and-Tested-by: Robbert Kouprie
    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     

07 Dec, 2010

1 commit

  • Some of the code under CONFIG_CIFS_ACL is dependent upon code under
    CONFIG_CIFS_EXPERIMENTAL, but the Kconfig options don't reflect that
    dependency. Move more of the ACL code out from under
    CONFIG_CIFS_EXPERIMENTAL and under CONFIG_CIFS_ACL.

    Also move find_readable_file out from other any sort of Kconfig
    option and make it a function normally compiled in.

    Reported-and-Acked-by: Randy Dunlap
    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     

03 Dec, 2010

1 commit

  • Currently, the attribute cache timeout for CIFS is hardcoded to 1 second. This
    means that the client might have to issue a QPATHINFO/QFILEINFO call every 1
    second to verify if something has changes, which seems too expensive. On the
    other hand, if the timeout is hardcoded to a higher value, workloads that
    expect strict cache coherency might see unexpected results.

    Making attribute cache timeout as a tunable will allow us to make a tradeoff
    between performance and cache metadata correctness depending on the
    application/workload needs.

    Add 'actimeo' tunable that can be used to tune the attribute cache timeout.
    The default timeout is set to 1 second. Also, display actimeo option value in
    /proc/mounts.

    It appears to me that 'actimeo' and the proposed (but not yet merged)
    'strictcache' option cannot coexist, so care must be taken that we reset the
    other option if one of them is set.

    Changes since last post:
    - fix option parsing and handle possible values correcly

    Reviewed-by: Jeff Layton
    Signed-off-by: Suresh Jayaraman
    Signed-off-by: Steve French

    Suresh Jayaraman
     

30 Nov, 2010

2 commits


11 Nov, 2010

1 commit

  • cifs_root_iget allocates full_path through
    cifs_build_path_to_root, but fails to kfree it upon
    cifs_get_inode_info* failure.

    Make all failure exit paths traverse clean up
    handling at the end of the function.

    Signed-off-by: Oskar Schirmer
    Reviewed-by: Jesper Juhl
    Cc: stable@kernel.org
    Signed-off-by: Steve French

    Oskar Schirmer
     

09 Nov, 2010

1 commit

  • Andrew Hendry reported a kmemleak warning in 2.6.37-rc1 while editing a
    text file with gedit over cifs.

    unreferenced object 0xffff88022ee08b40 (size 32):
    comm "gedit", pid 2524, jiffies 4300160388 (age 2633.655s)
    hex dump (first 32 bytes):
    5c 2e 67 6f 75 74 70 75 74 73 74 72 65 61 6d 2d \.goutputstream-
    35 42 41 53 4c 56 00 de 09 00 00 00 2c 26 78 ee 5BASLV......,&x.
    backtrace:
    [] kmemleak_alloc+0x2d/0x60
    [] __kmalloc+0xe3/0x1d0
    [] build_path_from_dentry+0xf0/0x230 [cifs]
    [] cifs_setattr+0x9e/0x770 [cifs]
    [] notify_change+0x170/0x2e0
    [] sys_fchmod+0x10b/0x140
    [] system_call_fastpath+0x16/0x1b
    [] 0xffffffffffffffff

    The commit 1025774c that removed inode_setattr() seems to have introduced this
    memleak by returning early without freeing 'full_path'.

    Reported-by: Andrew Hendry
    Cc: Christoph Hellwig
    Reviewed-by: Jeff Layton
    Signed-off-by: Suresh Jayaraman
    Signed-off-by: Steve French

    Suresh Jayaraman
     

25 Oct, 2010

1 commit

  • write_behind_rc is redundant and just adds complexity to the code. What
    we really want to do instead is to use mapping_set_error to reset the
    flags on the mapping when we find a writeback error and can't report it
    to userspace yet.

    For cifs_flush and cifs_fsync, we shouldn't reset the flags since errors
    returned there do get reported to userspace.

    Signed-off-by: Jeff Layton
    Reviewed-by: Suresh Jayaraman
    Reviewed-by: Dave Kleikamp
    Signed-off-by: Steve French

    Jeff Layton
     

12 Oct, 2010

1 commit


08 Oct, 2010

2 commits


07 Oct, 2010

3 commits


30 Sep, 2010

5 commits

  • Testing on very recent kernel (2.6.36-rc6) made this warning pop:

    WARNING: at fs/fs-writeback.c:87 inode_to_bdi+0x65/0x70()
    Hardware name:
    Dirtiable inode bdi default != sb bdi cifs

    ...the following patch fixes it and seems to be the obviously correct
    thing to do for cifs.

    Cc: stable@kernel.org
    Acked-by: Dave Kleikamp
    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     
  • At mount time, we'll always need to create a tcon that will serve as a
    template for others that are associated with the mount. This tcon is
    known as the "master" tcon.

    In some cases, we'll need to use that tcon regardless of who's accessing
    the mount. Add an accessor function for the master tcon and go ahead and
    switch the appropriate places to use it.

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

    Jeff Layton
     
  • When we convert cifs to do multiple sessions per mount, we'll need more
    than one tcon per superblock. At that point "cifs_sb->tcon" will make
    no sense. Add a new accessor function that gets a tcon given a cifs_sb.
    For now, it just returns cifs_sb->tcon. Later it'll do more.

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

    Jeff Layton
     
  • ...where it's available and appropriate.

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

    Jeff Layton
     
  • If configured, Minshall+French Symlinks are used against
    all servers. If the server supports UNIX Extensions,
    we still create Minshall+French Symlinks on write,
    but on read we fallback to UNIX Extension symlinks.

    Signed-off-by: Stefan Metzmacher
    Signed-off-by: Steve French

    Stefan Metzmacher