1. 20 1月, 2011 2 次提交
    • J
      cifs: don't fail writepages on -EAGAIN errors · 941b853d
      Jeff Layton 提交于
      If CIFSSMBWrite2 returns -EAGAIN, then the error should be considered
      temporary. CIFS should retry the write instead of setting an error on
      the mapping and returning.
      
      For WB_SYNC_ALL, just retry the write immediately. In the WB_SYNC_NONE
      case, call redirty_page_for_writeback on all of the pages that didn't
      get written out and then move on.
      
      Also, fix up the handling of a short write with a successful return
      code. MS-CIFS says that 0 bytes_written means ENOSPC or EFBIG. It
      doesn't mention what a short, but non-zero write means, so for now
      treat it as we would an -EAGAIN return.
      Reviewed-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Reviewed-by: NPavel Shilovsky <piastryyy@gmail.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      941b853d
    • P
      CIFS: Fix oplock break handling (try #2) · 12fed00d
      Pavel Shilovsky 提交于
      When we get oplock break notification we should set the appropriate
      value of OplockLevel field in oplock break acknowledge according to
      the oplock level held by the client in this time. As we only can have
      level II oplock or no oplock in the case of oplock break, we should be
      aware only about clientCanCacheRead field in cifsInodeInfo structure.
      
      Also fix bug connected with wrong interpretation of OplockLevel field
      during oplock break notification processing.
      Signed-off-by: NPavel Shilovsky <piastryyy@gmail.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      12fed00d
  2. 19 1月, 2011 38 次提交