1. 25 7月, 2012 1 次提交
  2. 24 7月, 2012 7 次提交
  3. 17 7月, 2012 1 次提交
    • J
      cifs: when CONFIG_HIGHMEM is set, serialize the read/write kmaps · 3cf003c0
      Jeff Layton 提交于
      Jian found that when he ran fsx on a 32 bit arch with a large wsize the
      process and one of the bdi writeback kthreads would sometimes deadlock
      with a stack trace like this:
      
      crash> bt
      PID: 2789   TASK: f02edaa0  CPU: 3   COMMAND: "fsx"
       #0 [eed63cbc] schedule at c083c5b3
       #1 [eed63d80] kmap_high at c0500ec8
       #2 [eed63db0] cifs_async_writev at f7fabcd7 [cifs]
       #3 [eed63df0] cifs_writepages at f7fb7f5c [cifs]
       #4 [eed63e50] do_writepages at c04f3e32
       #5 [eed63e54] __filemap_fdatawrite_range at c04e152a
       #6 [eed63ea4] filemap_fdatawrite at c04e1b3e
       #7 [eed63eb4] cifs_file_aio_write at f7fa111a [cifs]
       #8 [eed63ecc] do_sync_write at c052d202
       #9 [eed63f74] vfs_write at c052d4ee
      #10 [eed63f94] sys_write at c052df4c
      #11 [eed63fb0] ia32_sysenter_target at c0409a98
          EAX: 00000004  EBX: 00000003  ECX: abd73b73  EDX: 012a65c6
          DS:  007b      ESI: 012a65c6  ES:  007b      EDI: 00000000
          SS:  007b      ESP: bf8db178  EBP: bf8db1f8  GS:  0033
          CS:  0073      EIP: 40000424  ERR: 00000004  EFLAGS: 00000246
      
      Each task would kmap part of its address array before getting stuck, but
      not enough to actually issue the write.
      
      This patch fixes this by serializing the marshal_iov operations for
      async reads and writes. The idea here is to ensure that cifs
      aggressively tries to populate a request before attempting to fulfill
      another one. As soon as all of the pages are kmapped for a request, then
      we can unlock and allow another one to proceed.
      
      There's no need to do this serialization on non-CONFIG_HIGHMEM arches
      however, so optimize all of this out when CONFIG_HIGHMEM isn't set.
      
      Cc: <stable@vger.kernel.org>
      Reported-by: NJian Li <jiali@redhat.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      3cf003c0
  4. 02 6月, 2012 1 次提交
  5. 23 5月, 2012 3 次提交
  6. 17 5月, 2012 4 次提交
  7. 04 5月, 2012 1 次提交
  8. 01 4月, 2012 1 次提交
    • J
      cifs: silence compiler warnings showing up with gcc-4.7.0 · b2a3ad9c
      Jeff Layton 提交于
      gcc-4.7.0 has started throwing these warnings when building cifs.ko.
      
        CC [M]  fs/cifs/cifssmb.o
      fs/cifs/cifssmb.c: In function ‘CIFSSMBSetCIFSACL’:
      fs/cifs/cifssmb.c:3905:9: warning: array subscript is above array bounds [-Warray-bounds]
      fs/cifs/cifssmb.c: In function ‘CIFSSMBSetFileInfo’:
      fs/cifs/cifssmb.c:5711:8: warning: array subscript is above array bounds [-Warray-bounds]
      fs/cifs/cifssmb.c: In function ‘CIFSSMBUnixSetFileInfo’:
      fs/cifs/cifssmb.c:6001:25: warning: array subscript is above array bounds [-Warray-bounds]
      
      This patch cleans up the code a bit by using the offsetof macro instead
      of the funky "&pSMB->hdr.Protocol" construct.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      b2a3ad9c
  9. 24 3月, 2012 9 次提交
  10. 22 3月, 2012 2 次提交
  11. 20 3月, 2012 1 次提交
  12. 19 1月, 2012 1 次提交
  13. 25 10月, 2011 2 次提交
  14. 21 10月, 2011 1 次提交
  15. 20 10月, 2011 2 次提交
    • J
      cifs: add cifs_async_readv · e28bc5b1
      Jeff Layton 提交于
      ...which will allow cifs to do an asynchronous read call to the server.
      The caller will allocate and set up cifs_readdata for each READ_AND_X
      call that should be issued on the wire. The pages passed in are added
      to the pagecache, but not placed on the LRU list yet (as we need the
      page->lru to keep the pages on the list in the readdata).
      
      When cifsd identifies the mid, it will see that there is a special
      receive handler for the call, and use that to receive the rest of the
      frame. cifs_readv_receive will then marshal up a kvec array with
      kmapped pages from the pagecache, which eliminates one copy of the
      data. Once the data is received, the pages are added to the LRU list,
      set uptodate, and unlocked.
      Reviewed-and-Tested-by: NPavel Shilovsky <piastry@etersoft.ru>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      e28bc5b1
    • J
      cifs: add a callback function to receive the rest of the frame · 44d22d84
      Jeff Layton 提交于
      In order to handle larger SMBs for readpages and other calls, we want
      to be able to read into a preallocated set of buffers. Rather than
      changing all of the existing code to preallocate buffers however, we
      instead add a receive callback function to the MID.
      
      cifsd will call this function once the mid_q_entry has been identified
      in order to receive the rest of the SMB. If the mid can't be identified
      or the receive pointer is unset, then the standard 3rd phase receive
      function will be called.
      Reviewed-and-Tested-by: NPavel Shilovsky <piastry@etersoft.ru>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      44d22d84
  16. 17 10月, 2011 1 次提交
    • S
      cifs: Call id to SID mapping functions to change owner/group (try #4 repost) · a5ff3769
      Shirish Pargaonkar 提交于
      Now build security descriptor to change either owner or group at the
      server.  Initially security descriptor was built to change only
      (D)ACL, that functionality has been extended.
      
      When either an Owner or a Group of a file object at the server is changed,
      rest of security descriptor remains same (DACL etc.).
      
      To set security descriptor, it is necessary to open that file
      with permission bits of either WRITE_DAC if DACL is being modified or
      WRITE_OWNER (Take Ownership) if Owner or Group is being changed.
      
      It is the server that decides whether a set security descriptor with
      either owner or group change succeeds or not.
      Signed-off-by: NShirish Pargaonkar <shirishpargaonkar@gmail.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      a5ff3769
  17. 14 10月, 2011 1 次提交
  18. 13 10月, 2011 1 次提交
    • 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