1. 27 Jul, 2015 1 commit
  2. 22 Jul, 2015 8 commits
  3. 11 Jul, 2015 5 commits
  4. 08 Jul, 2015 1 commit
  5. 05 Jul, 2015 5 commits
  6. 03 Jul, 2015 2 commits
  7. 01 Jul, 2015 9 commits
  8. 29 Jun, 2015 1 commit
    • NeilBrown's avatar
      NFSv4: When returning a delegation, don't reclaim an incompatible open mode. · 39f897fd
      NeilBrown authored
      It is possible to have an active open with one mode, and a delegation
      for the same file with a different mode.
      In particular, a WR_ONLY open and an RD_ONLY delegation.
      This happens if a WR_ONLY open is followed by a RD_ONLY open which
      provides a delegation, but is then close.
      
      When returning the delegation, we currently try to claim opens for
      every open type (n_rdwr, n_rdonly, n_wronly).  As there is no harm
      in claiming an open for a mode that we already have, this is often
      simplest.
      
      However if the delegation only provides a subset of the modes that we
      currently have open, this will produce an error from the server.
      
      So when claiming open modes prior to returning a delegation, skip the
      open request if the mode is not covered by the delegation - the open_stateid
      must already cover that mode, so there is nothing to do.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      39f897fd
  9. 27 Jun, 2015 2 commits
  10. 26 Jun, 2015 5 commits
  11. 25 Jun, 2015 1 commit
    • Benjamin Coddington's avatar
      nfs: verify open flags before allowing open · 18a60089
      Benjamin Coddington authored
      Commit 9597c13b forbade opens with O_APPEND|O_DIRECT for NFSv4:
      
          nfs: verify open flags before allowing an atomic open
      
          Currently, you can open a NFSv4 file with O_APPEND|O_DIRECT, but cannot
          fcntl(F_SETFL,...) with those flags. This flag combination is explicitly
          forbidden on NFSv3 opens, and it seems like it should also be on NFSv4.
      
      However, you can still open a file with O_DIRECT|O_APPEND if there exists a
      cached dentry for the file because nfs4_file_open() is used instead of
      nfs_atomic_open() and the check is bypassed.  Add the check in
      nfs4_file_open() as well.
      Signed-off-by: default avatarBenjamin Coddington <bcodding@redhat.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      18a60089