1. 05 5月, 2013 3 次提交
    • J
      cifs: store the real expected sequence number in the mid · 0124cc45
      Jeff Layton 提交于
      Currently, the signing routines take a pointer to a place to store the
      expected sequence number for the mid response. It then stores a value
      that's one below what that sequence number should be, and then adds one
      to it when verifying the signature on the response.
      
      Increment the sequence number before storing the value in the mid, and
      eliminate the "+1" when checking the signature.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      0124cc45
    • J
      [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg · f96637be
      Joe Perches 提交于
      It's not obvious from reading the macro names that these macros
      are for debugging.  Convert the names to a single more typical
      kernel style cifs_dbg macro.
      
      	cERROR(1, ...)   -> cifs_dbg(VFS, ...)
      	cFYI(1, ...)     -> cifs_dbg(FYI, ...)
      	cFYI(DBG2, ...)  -> cifs_dbg(NOISY, ...)
      
      Move the terminating format newline from the macro to the call site.
      
      Add CONFIG_CIFS_DEBUG function cifs_vfs_err to emit the
      "CIFS VFS: " prefix for VFS messages.
      
      Size is reduced ~ 1% when CONFIG_CIFS_DEBUG is set (default y)
      
      $ size fs/cifs/cifs.ko*
         text    data     bss     dec     hex filename
       265245	   2525	    132	 267902	  4167e	fs/cifs/cifs.ko.new
       268359    2525     132  271016   422a8 fs/cifs/cifs.ko.old
      
      Other miscellaneous changes around these conversions:
      
      o Miscellaneous typo fixes
      o Add terminating \n's to almost all formats and remove them
        from the macros to be more kernel style like.  A few formats
        previously had defective \n's
      o Remove unnecessary OOM messages as kmalloc() calls dump_stack
      o Coalesce formats to make grep easier,
        added missing spaces when coalescing formats
      o Use %s, __func__ instead of embedded function name
      o Removed unnecessary "cifs: " prefixes
      o Convert kzalloc with multiply to kcalloc
      o Remove unused cifswarn macro
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      f96637be
    • S
      fs: cifs: use kmemdup instead of kmalloc + memcpy · f7f7c185
      Silviu-Mihai Popescu 提交于
      This replaces calls to kmalloc followed by memcpy with a single call to
      kmemdup. This was found via make coccicheck.
      Signed-off-by: NSilviu-Mihai Popescu <silviupopescu1990@gmail.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      f7f7c185
  2. 07 3月, 2013 1 次提交
  3. 28 2月, 2013 1 次提交
  4. 13 2月, 2013 1 次提交
  5. 29 9月, 2012 1 次提交
  6. 25 9月, 2012 14 次提交
  7. 20 8月, 2012 1 次提交
  8. 28 7月, 2012 3 次提交
  9. 25 7月, 2012 6 次提交
  10. 24 7月, 2012 7 次提交
  11. 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
  12. 02 6月, 2012 1 次提交