1. 17 10月, 2014 1 次提交
    • S
      Allow conversion of characters in Mac remap range. Part 1 · b693855f
      Steve French 提交于
      This allows directory listings to Mac to display filenames
      correctly which have been created with illegal (to Windows)
      characters in their filename. It does not allow
      converting the other direction yet ie opening files with
      these characters (followon patch).
      
      There are seven reserved characters that need to be remapped when
      mounting to Windows, Mac (or any server without Unix Extensions) which
      are valid in POSIX but not in the other OS.
      
      : \ < > ? * |
      
      We used the normal UCS-2 remap range for this in order to convert this
      to/from UTF8 as did Windows Services for Unix (basically add 0xF000 to
      any of the 7 reserved characters), at least when the "mapchars" mount
      option was specified.
      
      Mac used a very slightly different "Services for Mac" remap range
      0xF021 through 0xF027.  The attached patch allows cifs.ko (the kernel
      client) to read directories on macs containing files with these
      characters and display their names properly.  In theory this even
      might be useful on mounts to Samba when the vfs_catia or new
      "vfs_fruit" module is loaded.
      
      Currently the 7 reserved characters look very strange in directory
      listings from cifs.ko to Mac server.  This patch allows these file
      name characters to be read (requires specifying mapchars on mount).
      
      Two additional changes are needed:
      1) Make it more automatic: a way of detecting enough info so that
      we know to try to always remap these characters or not. Various
      have suggested that the SFM approach be made the default when
      the server does not support POSIX Unix extensions (cifs mounts
      to Samba for example) so need to make SFM remapping the default
      unless mapchars (SFU style mapping) specified on mount or no
      mapping explicitly requested or no mapping needed (cifs mounts to Samba).
      
      2) Adding a patch to map the characters the other direction
      (ie UTF-8 to UCS-2 on open).  This patch does it for translating
      readdir entries (ie UCS-2 to UTF-8)
      Signed-off-by: NSteve French <smfrench@gmail.com>
      Reviewed-by: NShirish Pargaonkar <shirishpargaonkar@gmail.com>
      b693855f
  2. 25 10月, 2013 1 次提交
  3. 13 2月, 2013 1 次提交
  4. 04 1月, 2012 1 次提交
  5. 13 10月, 2011 1 次提交
    • S
      cifs: Add mount options for backup intent (try #6) · 3d3ea8e6
      Shirish Pargaonkar 提交于
      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: NShirish Pargaonkar <shirishpargaonkar@gmail.com>
      Reviewed-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      3d3ea8e6
  6. 25 6月, 2011 1 次提交
  7. 27 5月, 2011 2 次提交
  8. 19 5月, 2011 1 次提交
  9. 21 1月, 2011 1 次提交
  10. 03 12月, 2010 1 次提交
    • S
      cifs: add attribute cache timeout (actimeo) tunable · 6d20e840
      Suresh Jayaraman 提交于
      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: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      6d20e840
  11. 03 11月, 2010 2 次提交
    • J
      cifs: convert tlink_tree to a rbtree · b647c35f
      Jeff Layton 提交于
      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: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      b647c35f
    • J
      cifs: store pointer to master tlink in superblock (try #2) · 413e661c
      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: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      413e661c
  12. 13 10月, 2010 1 次提交
    • J
      cifs: don't use vfsmount to pin superblock for oplock breaks · d7c86ff8
      Jeff Layton 提交于
      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: NJeff Layton <jlayton@redhat.com>
      Reviewed-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Acked-by: NDave Kleikamp <shaggy@linux.vnet.ibm.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      d7c86ff8
  13. 08 10月, 2010 2 次提交
    • J
      cifs: implement recurring workqueue job to prune old tcons · 2de970ff
      Jeff Layton 提交于
      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: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      2de970ff
    • J
      cifs: add routines to build sessions and tcons on the fly · 9d002df4
      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: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      9d002df4
  14. 07 10月, 2010 1 次提交
  15. 30 9月, 2010 2 次提交
  16. 02 8月, 2010 1 次提交
  17. 22 4月, 2010 1 次提交
  18. 12 3月, 2009 2 次提交
    • S
      [CIFS] fix build error · 4717bed6
      Steve French 提交于
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      4717bed6
    • S
      [CIFS] Add new nostrictsync cifs mount option to avoid slow SMB flush · be652445
      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: NSteve French <sfrench@us.ibm.com>
      be652445
  19. 26 12月, 2008 1 次提交
    • S
      [CIFS] add mount option to send mandatory rather than advisory locks · 13a6e42a
      Steve French 提交于
      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: NJeff Layton <jlayton@redhat.com>
      CC: Alexander Bokovoy <ab@samba.org>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      13a6e42a
  20. 14 11月, 2008 1 次提交
  21. 13 5月, 2008 1 次提交
    • J
      [CIFS] CIFS currently allows for permissions to be changed on files, even · d0a9c078
      Jeff Layton 提交于
      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: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      d0a9c078
  22. 11 1月, 2008 1 次提交
  23. 13 7月, 2007 1 次提交
  24. 01 5月, 2007 1 次提交
    • S
      [CIFS] UID/GID override on CIFS mounts to Samba · 4523cc30
      Steve French 提交于
      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: NSteve French <sfrench@us.ibm.com>
      4523cc30
  25. 21 9月, 2006 1 次提交
  26. 13 1月, 2006 1 次提交
  27. 20 8月, 2005 1 次提交
  28. 19 8月, 2005 1 次提交
  29. 15 7月, 2005 1 次提交
    • S
      [CIFS] Add compat with SFU (part 1) · d7245c2c
      Steve French 提交于
      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
      d7245c2c
  30. 23 6月, 2005 1 次提交
  31. 29 4月, 2005 1 次提交
  32. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      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!
      1da177e4