1. 19 Jan, 2011 2 commits
    • Jeff Layton's avatar
      cifs: don't fail writepages on -EAGAIN errors · 941b853d
      Jeff Layton authored
      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: default avatarSuresh Jayaraman <sjayaraman@suse.de>
      Reviewed-by: default avatarPavel Shilovsky <piastryyy@gmail.com>
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
      941b853d
    • Pavel Shilovsky's avatar
      CIFS: Fix oplock break handling (try #2) · 12fed00d
      Pavel Shilovsky authored
      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: default avatarPavel Shilovsky <piastryyy@gmail.com>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
      12fed00d
  2. 18 Jan, 2011 38 commits