1. 17 5月, 2012 5 次提交
  2. 20 4月, 2012 1 次提交
    • J
      cifs: fix offset handling in cifs_iovec_write · 3af9d8f2
      Jeff Layton 提交于
      In the recent update of the cifs_iovec_write code to use async writes,
      the handling of the file position was broken. That patch added a local
      "offset" variable to handle the offset, and then only updated the
      original "*poffset" before exiting.
      
      Unfortunately, it copied off the original offset from the beginning,
      instead of doing so after generic_write_checks had been called. Fix
      this by moving the initialization of "offset" after that in the
      function.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      3af9d8f2
  3. 02 4月, 2012 2 次提交
  4. 01 4月, 2012 1 次提交
  5. 24 3月, 2012 8 次提交
  6. 20 3月, 2012 1 次提交
  7. 19 3月, 2012 1 次提交
  8. 07 3月, 2012 1 次提交
  9. 09 12月, 2011 1 次提交
  10. 09 11月, 2011 1 次提交
  11. 04 11月, 2011 2 次提交
  12. 30 10月, 2011 1 次提交
  13. 29 10月, 2011 1 次提交
  14. 25 10月, 2011 4 次提交
  15. 20 10月, 2011 2 次提交
    • J
      cifs: allow for larger rsize= options and change defaults · 5eba8ab3
      Jeff Layton 提交于
      Currently we cap the rsize at a value that fits in CIFSMaxBufSize. That's
      not needed any longer for readpages. Allow the use of larger values for
      readpages. cifs_iovec_read and cifs_read however are still limited to the
      CIFSMaxBufSize. Make sure they don't exceed that.
      
      The patch also changes the rsize defaults. The default when unix
      extensions are enabled is set to 1M for parity with the wsize, and there
      is a hard cap of ~16M.
      
      When unix extensions are not enabled, the default is set to 60k. According
      to MS-CIFS, Windows servers can only send a max of 60k at a time, so
      this is more efficient than requesting a larger size. If the user wishes
      however, the max can be extended up to 128k - the length of the READ_RSP
      header.
      
      Really old servers however require a special hack to ensure that we don't
      request too large a read.
      Reviewed-and-Tested-by: NPavel Shilovsky <piastry@etersoft.ru>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      5eba8ab3
    • J
      cifs: convert cifs_readpages to use async reads · 690c5e31
      Jeff Layton 提交于
      Now that we have code in place to do asynchronous reads, convert
      cifs_readpages to use it. The new cifs_readpages walks the page_list
      that gets passed in, locks and adds the pages to the pagecache and
      sets up cifs_readdata to handle the reads.
      
      The rest is handled by the cifs_async_readv infrastructure.
      Reviewed-and-Tested-by: NPavel Shilovsky <piastry@etersoft.ru>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      690c5e31
  16. 18 10月, 2011 1 次提交
  17. 14 10月, 2011 2 次提交
  18. 13 10月, 2011 3 次提交
    • 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
    • S
      add new module parameter 'enable_oplocks' · e7504734
      Steve French 提交于
      Thus spake Jeff Layton:
      
      "Making that a module parm would allow you to set that parameter at boot
      time without needing to add special startup scripts. IMO, all of the
      procfile "switches" under /proc/fs/cifs should be module parms
      instead."
      
      This patch doesn't alter the default behavior (Oplocks are enabled by
      default).
      
      To disable oplocks when loading the module, use
      
         modprobe cifs enable_oplocks=0
      
      (any of '0' or 'n' or 'N' conventions can be used).
      
      To disable oplocks at runtime using the new interface, use
      
         echo 0 > /sys/module/cifs/parameters/enable_oplocks
      
      The older /proc/fs/cifs/OplockEnabled interface will be deprecated
      after two releases. A subsequent patch will add an warning message
      about this deprecation.
      
      Changes since v2:
         - make enable_oplocks a 'bool'
      
      Changes since v1:
         - eliminate the use of extra variable by renaming the old one to
           enable_oplocks and make it an 'int' type.
      Reported-by: NAlexander Swen <alex@swen.nu>
      Reviewed-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      e7504734
    • J
      cifs: untangle server->maxBuf and CIFSMaxBufSize · c974befa
      Jeff Layton 提交于
      server->maxBuf is the maximum SMB size (including header) that the
      server can handle. CIFSMaxBufSize is the maximum amount of data (sans
      header) that the client can handle. Currently maxBuf is being capped at
      CIFSMaxBufSize + the max headers size, and the two values are used
      somewhat interchangeably in the code.
      
      This makes little sense as these two values are not related at all.
      Separate them and make sure the code uses the right values in the right
      places.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      c974befa
  19. 01 8月, 2011 1 次提交
    • J
      cifs: simplify refcounting for oplock breaks · ad635942
      Jeff Layton 提交于
      Currently, we take a sb->s_active reference and a cifsFileInfo reference
      when an oplock break workqueue job is queued. This is unnecessary and
      more complicated than it needs to be. Also as Al points out,
      deactivate_super has non-trivial locking implications so it's best to
      avoid that if we can.
      
      Instead, just cancel any pending oplock breaks for this filehandle
      synchronously in cifsFileInfo_put after taking it off the lists.
      That should ensure that this job doesn't outlive the structures it
      depends on.
      Reported-by: NAl Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      ad635942
  20. 21 7月, 2011 1 次提交