04 Jan, 2012

1 commit


13 Oct, 2011

1 commit

  • Add mount options backupuid and backugid.

    It allows an authenticated user to access files with the intent to back them
    up including their ACLs, who may not have access permission but has
    "Backup files and directories user right" on them (by virtue of being part
    of the built-in group Backup Operators.

    When mount options backupuid is specified, cifs client restricts the
    use of backup intents to the user whose effective user id is specified
    along with the mount option.

    When mount options backupgid is specified, cifs client restricts the
    use of backup intents to the users whose effective user id belongs to the
    group id specified along with the mount option.

    If an authenticated user is not part of the built-in group Backup Operators
    at the server, access to such files is denied, even if allowed by the client.

    Signed-off-by: Shirish Pargaonkar
    Reviewed-by: Jeff Layton
    Signed-off-by: Steve French

    Shirish Pargaonkar
     

25 Jun, 2011

1 commit

  • To close sget() races we'll need to be able to set cifs_sb up before
    we get the superblock, so we'll want to be able to do cifs_mount()
    earlier. Fortunately, it's easy to do - setting ->s_maxbytes can
    be done in cifs_read_super(), ditto for ->s_time_gran and as for
    putting MS_POSIXACL into ->s_flags, we can mirror it in ->mnt_cifs_flags
    until cifs_read_super() is called. Kill unused 'devname' argument,
    while we are at it...

    Acked-by: Pavel Shilovsky
    Reviewed-by: Jeff Layton
    Signed-off-by: Al Viro

    Al Viro
     

27 May, 2011

2 commits

  • 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
     

19 May, 2011

1 commit

  • Previously mount options were copied and updated in the cifs_sb_info
    struct only when CONFIG_CIFS_DFS_UPCALL was enabled. Making this
    information generally available allows us to remove a number of ifdefs,
    extra function params, and temporary variables.

    Reviewed-by: Jeff Layton
    Signed-off-by: Sean Finney
    Signed-off-by: Steve French

    Sean Finney
     

21 Jan, 2011

1 commit


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
     

03 Nov, 2010

2 commits

  • Radix trees are ideal when you want to track a bunch of pointers and
    can't embed a tracking structure within the target of those pointers.
    The tradeoff is an increase in memory, particularly if the tree is
    sparse.

    In CIFS, we use the tlink_tree to track tcon_link structs. A tcon_link
    can never be in more than one tlink_tree, so there's no impediment to
    using a rb_tree here instead of a radix tree.

    Convert the new multiuser mount code to use a rb_tree instead. This
    should reduce the memory required to manage the tlink_tree.

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

    Jeff Layton
     
  • This is the second version of this patch, the only difference between
    it and the first one is that this explicitly makes cifs_sb_master_tlink
    a static inline.

    Instead of keeping a tag on the master tlink in the tree, just keep a
    pointer to the master in the superblock. That eliminates the need for
    using the radix tree to look up a tagged entry.

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

    Jeff Layton
     

13 Oct, 2010

1 commit

  • Filesystems aren't really supposed to do anything with a vfsmount. It's
    considered a layering violation since vfsmounts are entirely managed at
    the VFS layer.

    CIFS currently keeps an active reference to a vfsmount in order to
    prevent the superblock vanishing before an oplock break has completed.
    What we really want to do instead is to keep sb->s_active high until the
    oplock break has completed. This patch borrows the scheme that NFS uses
    for handling sillyrenames.

    An atomic_t is added to the cifs_sb_info. When it transitions from 0 to
    1, an extra reference to the superblock is taken (by bumping the
    s_active value). When it transitions from 1 to 0, that reference is
    dropped and a the superblock teardown may proceed if there are no more
    references to it.

    Also, the vfsmount pointer is removed from cifsFileInfo and from
    cifs_new_fileinfo, and some bogus forward declarations are removed from
    cifsfs.h.

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

    Jeff Layton
     

08 Oct, 2010

2 commits

  • Create a workqueue job that cleans out unused tlinks. For now, it uses
    a hardcoded expire time of 10 minutes. When it's done, the work rearms
    itself. On umount, the work is cancelled before tearing down the tlink
    tree.

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

    Jeff Layton
     
  • This patch is rather large, but it's a bit difficult to do piecemeal...

    For non-multiuser mounts, everything will basically work as it does
    today. A call to cifs_sb_tlink will return the "master" tcon link.

    Turn the tcon pointer in the cifs_sb into a radix tree that uses the
    fsuid of the process as a key. The value is a new "tcon_link" struct
    that contains info about a tcon that's under construction.

    When a new process needs a tcon, it'll call cifs_sb_tcon. That will
    then look up the tcon_link in the radix tree. If it exists and is
    valid, it's returned.

    If it doesn't exist, then we stuff a new tcon_link into the tree and
    mark it as pending and then go and try to build the session/tcon.
    If that works, the tcon pointer in the tcon_link is updated and the
    pending flag is cleared.

    If the construction fails, then we set the tcon pointer to an ERR_PTR
    and clear the pending flag.

    If the radix tree is searched and the tcon_link is marked pending
    then we go to sleep and wait for the pending flag to be cleared.

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

    Jeff Layton
     

07 Oct, 2010

1 commit


30 Sep, 2010

2 commits


02 Aug, 2010

1 commit

  • Add a mount option 'fsc' to enable local caching on CIFS.

    I considered adding a separate debug bit for caching, but it appears that
    debugging would be relatively easier with the normal CIFS_INFO level.

    As the cifs-utils (userspace) changes are not done yet, this patch enables
    'fsc' by default to enable testing.

    Signed-off-by: Suresh Jayaraman
    Acked-by: David Howells
    Signed-off-by: Steve French

    Suresh Jayaraman
     

22 Apr, 2010

1 commit


12 Mar, 2009

2 commits

  • Signed-off-by: Steve French

    Steve French
     
  • If this mount option is set, when an application does an
    fsync call then the cifs client does not send an SMB Flush
    to the server (to force the server to write all dirty data
    for this file immediately to disk), although cifs still sends
    all dirty (cached) file data to the server and waits for the
    server to respond to the write write. Since SMB Flush can be
    very slow, and some servers may be reliable enough (to risk
    delaying slightly flushing the data to disk on the server),
    turning on this option may be useful to improve performance for
    applications that fsync too much, at a small risk of server
    crash. If this mount option is not set, by default cifs will
    send an SMB flush request (and wait for a response) on every
    fsync call.

    Signed-off-by: Steve French

    Steve French
     

29 Dec, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: (31 commits)
    [CIFS] Remove redundant test
    [CIFS] make sure that DFS pathnames are properly formed
    Remove an already-checked error condition in SendReceiveBlockingLock
    Streamline SendReceiveBlockingLock: Use "goto out:" in an error condition
    Streamline SendReceiveBlockingLock: Use "goto out:" in an error condition
    [CIFS] Streamline SendReceive[2] by using "goto out:" in an error condition
    Slightly streamline SendReceive[2]
    Check the return value of cifs_sign_smb[2]
    [CIFS] Cleanup: Move the check for too large R/W requests
    [CIFS] Slightly simplify wait_for_free_request(), remove an unnecessary "else" branch
    Simplify allocate_mid() slightly: Remove some unnecessary "else" branches
    [CIFS] In SendReceive, move consistency check out of the mutexed region
    cifs: store password in tcon
    cifs: have calc_lanman_hash take more granular args
    cifs: zero out session password before freeing it
    cifs: fix wait_for_response to time out sleeping processes correctly
    [CIFS] Can not mount with prefixpath if root directory of share is inaccessible
    [CIFS] various minor cleanups pointed out by checkpatch script
    [CIFS] fix typo
    [CIFS] remove sparse warning
    ...

    Fix trivial conflict in fs/cifs/cifs_fs_sb.h due to comment changes for
    the CIFS_MOUNT_xyz bit definitions between cifs updates and security
    updates.

    Linus Torvalds
     

26 Dec, 2008

1 commit

  • Some applications/subsystems require mandatory byte range locks
    (as is used for Windows/DOS/OS2 etc). Sending advisory (posix style)
    byte range lock requests (instead of mandatory byte range locks) can
    lead to problems for these applications (which expect that other
    clients be prevented from writing to portions of the file which
    they have locked and are updating). This mount option allows
    mounting cifs with the new mount option "forcemand" (or
    "forcemandatorylock") in order to have the cifs client use mandatory
    byte range locks (ie SMB/CIFS/Windows/NTFS style locks) rather than
    posix byte range lock requests, even if the server would support
    posix byte range lock requests. This has no effect if the server
    does not support the CIFS Unix Extensions (since posix style locks
    require support for the CIFS Unix Extensions), but for mounts
    to Samba servers this can be helpful for Wine and applications
    that require mandatory byte range locks.

    Acked-by: Jeff Layton
    CC: Alexander Bokovoy
    Signed-off-by: Steve French

    Steve French
     

14 Nov, 2008

1 commit

  • Wrap access to task credentials so that they can be separated more easily from
    the task_struct during the introduction of COW creds.

    Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id().

    Change some task->e?[ug]id to task_e?[ug]id(). In some places it makes more
    sense to use RCU directly rather than a convenient wrapper; these will be
    addressed by later patches.

    Signed-off-by: David Howells
    Reviewed-by: James Morris
    Acked-by: Serge Hallyn
    Cc: Steve French
    Cc: linux-cifs-client@lists.samba.org
    Signed-off-by: James Morris

    David Howells
     

13 May, 2008

1 commit

  • when unix extensions and cifsacl support are disabled. These
    permissions changes are "ephemeral" however. They are lost whenever
    a share is mounted and unmounted, or when memory pressure forces
    the inode out of the cache.

    Because of this, we'd like to introduce a behavior change to make
    CIFS behave more like local DOS/Windows filesystems. When unix
    extensions and cifsacl support aren't enabled, then don't silently
    ignore changes to permission bits that can't be reflected on the
    server.

    Still, there may be people relying on the current behavior for
    certain applications. This patch adds a new "dynperm" (and a
    corresponding "nodynperm") mount option that will be intended
    to make the client fall back to legacy behavior when setting
    these modes.

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

    Jeff Layton
     

11 Jan, 2008

1 commit


13 Jul, 2007

1 commit

  • This should be the last big batch of whitespace/formatting fixes.
    checkpatch warnings for the cifs directory are down about 90% and
    many of the remaining ones are harder to remove or make the code
    harder to read.

    Signed-off-by: Steve French

    Steve French
     

01 May, 2007

1 commit

  • When CIFS Unix Extensions are negotiated we get the Unix uid and gid
    owners of the file from the server (on the Unix Query Path Info
    levels), but if the server's uids don't match the client uid's users
    were having to disable the Unix Extensions (which turned off features
    they still wanted). The changeset patch allows users to override uid
    and/or gid for file/directory owner with a default uid and/or gid
    specified at mount (as is often done when mounting from Linux cifs
    client to Windows server). This changeset also displays the uid
    and gid used by default in /proc/mounts (if applicable).

    Also cleans up code by adding some of the missing spaces after
    "if" keywords per-kernel style guidelines (as suggested by Randy Dunlap
    when he reviewed the patch).

    Signed-off-by: Steve French

    Steve French
     

21 Sep, 2006

1 commit


13 Jan, 2006

1 commit


20 Aug, 2005

1 commit


19 Aug, 2005

1 commit


15 Jul, 2005

1 commit

  • This should help the case of creating fifos and other special files to
    servers which do not support the Unix extensions.

    Signed-off-by: Steve French (sfrench@us.ibm.com)

    Thanks to Martin Koeppe for his suggestions and good analysis

    Steve French
     

23 Jun, 2005

1 commit


29 Apr, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds