1. 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
  2. 30 9月, 2010 1 次提交
  3. 12 8月, 2010 1 次提交
  4. 06 8月, 2010 1 次提交
  5. 04 12月, 2009 1 次提交
  6. 04 8月, 2009 1 次提交
  7. 07 6月, 2009 1 次提交
  8. 28 5月, 2009 1 次提交
  9. 06 5月, 2009 1 次提交
  10. 12 3月, 2009 1 次提交
    • 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
  11. 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
  12. 23 10月, 2008 1 次提交
    • S
      [CIFS] improve setlease handling · 84210e91
      Steve French 提交于
      fcntl(F_SETLEASE) currently is not exported by cifs (nor by local file
      systems) so cifs grants leases based on how other local processes have
      opened the file not by whether the file is cacheable (oplocked).  This
      adds the check to make sure that the file is cacheable on the client
      before checking whether we can grant the lease locally
      (generic_setlease).  It also adds a mount option for cifs (locallease)
      if the user wants to override this and try to grant leases even
      if the server did not grant oplock.
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      84210e91
  13. 17 10月, 2008 1 次提交
  14. 28 8月, 2008 1 次提交
  15. 20 8月, 2008 1 次提交
  16. 16 5月, 2008 1 次提交
  17. 18 4月, 2008 1 次提交
  18. 08 2月, 2008 1 次提交
  19. 09 1月, 2008 1 次提交
  20. 21 11月, 2007 1 次提交
    • J
      [CIFS] Fix potential data corruption when writing out cached dirty pages · cea21805
      Jeff Layton 提交于
      Fix RedHat bug 329431
      
      The idea here is separate "conscious" from "unconscious" flushes.
      Conscious flushes are those due to a fsync() or close(). Unconscious
      ones are flushes that occur as a side effect of some other operation or
      due to memory pressure.
      
      Currently, when an error occurs during an unconscious flush (ENOSPC or
      EIO), we toss out the page and don't preserve that error to report to
      the user when a conscious flush occurs. If after the unconscious flush,
      there are no more dirty pages for the inode, the conscious flush will
      simply return success even though there were previous errors when writing
      out pages. This can lead to data corruption.
      
      The easiest way to reproduce this is to mount up a CIFS share that's
      very close to being full or where the user is very close to quota. mv
      a file to the share that's slightly larger than the quota allows. The
      writes will all succeed (since they go to pagecache). The mv will do a
      setattr to set the new file's attributes. This calls
      filemap_write_and_wait,
      which will return an error since all of the pages can't be written out.
      Then later, when the flush and release ops occur, there are no more
      dirty pages in pagecache for the file and those operations return 0. mv
      then assumes that the file was written out correctly and deletes the
      original.
      
      CIFS already has a write_behind_rc variable where it stores the results
      from earlier flushes, but that value is only reported in cifs_close.
      Since the VFS ignores the return value from the release operation, this
      isn't helpful. We should be reporting this error during the flush
      operation.
      
      This patch does the following:
      
      1) changes cifs_fsync to use filemap_write_and_wait and cifs_flush and also
      sync to check its return code. If it returns successful, they then check
      the value of write_behind_rc to see if an earlier flush had reported any
      errors. If so, they return that error and clear write_behind_rc.
      
      2) sets write_behind_rc in a few other places where pages are written
      out as a side effect of other operations and the code waits on them.
      
      3) changes cifs_setattr to only call filemap_write_and_wait for
      ATTR_SIZE changes.
      
      4) makes cifs_writepages accurately distinguish between EIO and ENOSPC
      errors when writing out pages.
      
      Some simple testing indicates that the patch works as expected and that
      it fixes the reproduceable known problem.
      Acked-by: NDave Kleikamp <shaggy@austin.rr.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      cea21805
  21. 18 8月, 2007 1 次提交
  22. 26 7月, 2007 1 次提交
  23. 12 7月, 2007 1 次提交
  24. 25 6月, 2007 1 次提交
  25. 06 5月, 2007 1 次提交
  26. 05 5月, 2007 1 次提交
    • J
      [CIFS] Make sec=none force an anonymous mount · 8426c39c
      Jeff Layton 提交于
      We had a customer report that attempting to make CIFS mount with a null
      username (i.e. doing an anonymous mount) doesn't work. Looking through the
      code, it looks like CIFS expects a NULL username from userspace in order
      to trigger an anonymous mount. The mount.cifs code doesn't seem to ever
      pass a null username to the kernel, however.
      
      It looks also like the kernel can take a sec=none option, but it only seems
      to look at it if the username is already NULL. This seems redundant and
      effectively makes sec=none useless.
      
      The following patch makes sec=none force an anonymous mount.
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      8426c39c
  27. 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
  28. 18 2月, 2007 1 次提交
  29. 04 10月, 2006 1 次提交
  30. 17 8月, 2006 1 次提交
  31. 27 6月, 2006 1 次提交
  32. 23 6月, 2006 1 次提交
  33. 04 6月, 2006 1 次提交
  34. 22 4月, 2006 1 次提交
  35. 02 3月, 2006 1 次提交
  36. 02 12月, 2005 1 次提交
  37. 30 11月, 2005 1 次提交
  38. 12 10月, 2005 1 次提交
  39. 11 10月, 2005 2 次提交