1. 19 3月, 2012 1 次提交
  2. 07 3月, 2012 1 次提交
  3. 09 12月, 2011 1 次提交
  4. 09 11月, 2011 1 次提交
  5. 04 11月, 2011 2 次提交
  6. 30 10月, 2011 1 次提交
  7. 29 10月, 2011 1 次提交
  8. 25 10月, 2011 4 次提交
  9. 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
  10. 18 10月, 2011 1 次提交
  11. 14 10月, 2011 2 次提交
  12. 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
  13. 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
  14. 21 7月, 2011 2 次提交
  15. 27 5月, 2011 3 次提交
  16. 26 5月, 2011 1 次提交
    • J
      cifs: convert cifs_writepages to use async writes · c3d17b63
      Jeff Layton 提交于
      Have cifs_writepages issue asynchronous writes instead of waiting on
      each write call to complete before issuing another. This also allows us
      to return more quickly from writepages. It can just send out all of the
      I/Os and not wait around for the replies.
      
      In the WB_SYNC_ALL case, if the write completes with a retryable error,
      then the completion workqueue job will resend the write.
      
      This also changes the page locking semantics a little bit. Instead of
      holding the page lock until the response is received, release it after
      doing the send. This will reduce contention for the page lock and should
      prevent processes that have the file mmap'ed from being blocked
      unnecessarily.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Reviewed-and-Tested-by: NPavel Shilovsky <piastry@etersoft.ru>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      c3d17b63
  17. 19 5月, 2011 3 次提交
  18. 12 4月, 2011 3 次提交
    • J
      cifs: don't allow mmap'ed pages to be dirtied while under writeback (try #3) · ca83ce3d
      Jeff Layton 提交于
      This is more or less the same patch as before, but with some merge
      conflicts fixed up.
      
      If a process has a dirty page mapped into its page tables, then it has
      the ability to change it while the client is trying to write the data
      out to the server. If that happens after the signature has been
      calculated then that signature will then be wrong, and the server will
      likely reset the TCP connection.
      
      This patch adds a page_mkwrite handler for CIFS that simply takes the
      page lock. Because the page lock is held over the life of writepage and
      writepages, this prevents the page from becoming writeable until
      the write call has completed.
      
      With this, we can also remove the "sign_zero_copy" module option and
      always inline the pages when writing.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      ca83ce3d
    • J
      cifs: replace /proc/fs/cifs/Experimental with a module parm · bdf1b03e
      Jeff Layton 提交于
      This flag currently only affects whether we allow "zero-copy" writes
      with signing enabled. Typically we map pages in the pagecache directly
      into the write request. If signing is enabled however and the contents
      of the page change after the signature is calculated but before the
      write is sent then the signature will be wrong. Servers typically
      respond to this by closing down the socket.
      
      Still, this can provide a performance benefit so the "Experimental" flag
      was overloaded to allow this. That's really not a good place for this
      option however since it's not clear what that flag does.
      
      Move that flag instead to a new module parameter that better describes
      its purpose. That's also better since it can be set at module insertion
      time by configuring modprobe.d.
      Reviewed-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      bdf1b03e
    • J
      cifs: check for private_data before trying to put it · 77970693
      Jeff Layton 提交于
      cifs_close doesn't check that the filp->private_data is non-NULL before
      trying to put it. That can cause an oops in certain error conditions
      that can occur on open or lookup before the private_data is set.
      Reported-by: NBen Greear <greearb@candelatech.com>
      CC: Stable <stable@kernel.org>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      77970693
  19. 10 3月, 2011 1 次提交
  20. 04 2月, 2011 1 次提交
  21. 31 1月, 2011 1 次提交
    • J
      cifs: clean up some compiler warnings · 31c2659d
      Jeff Layton 提交于
      New compiler warnings that I noticed when building a patchset based
      on recent Fedora kernel:
      
      fs/cifs/cifssmb.c: In function 'CIFSSMBSetFileSize':
      fs/cifs/cifssmb.c:4813:8: warning: variable 'data_offset' set but not used
      [-Wunused-but-set-variable]
      
      fs/cifs/file.c: In function 'cifs_open':
      fs/cifs/file.c:349:24: warning: variable 'pCifsInode' set but not used
      [-Wunused-but-set-variable]
      fs/cifs/file.c: In function 'cifs_partialpagewrite':
      fs/cifs/file.c:1149:23: warning: variable 'cifs_sb' set but not used
      [-Wunused-but-set-variable]
      fs/cifs/file.c: In function 'cifs_iovec_write':
      fs/cifs/file.c:1740:9: warning: passing argument 6 of 'CIFSSMBWrite2' from
      incompatible pointer type [enabled by default]
      fs/cifs/cifsproto.h:337:12: note: expected 'unsigned int *' but argument is
      of type 'size_t *'
      
      fs/cifs/readdir.c: In function 'cifs_readdir':
      fs/cifs/readdir.c:767:23: warning: variable 'cifs_sb' set but not used
      [-Wunused-but-set-variable]
      
      fs/cifs/cifs_dfs_ref.c: In function 'cifs_dfs_d_automount':
      fs/cifs/cifs_dfs_ref.c:342:2: warning: 'rc' may be used uninitialized in
      this function [-Wuninitialized]
      fs/cifs/cifs_dfs_ref.c:278:6: note: 'rc' was declared here
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Reviewed-by: NPavel Shilovsky <piastry@etersoft.ru>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      31c2659d
  22. 26 1月, 2011 1 次提交
  23. 21 1月, 2011 3 次提交