1. 17 Nov, 2017 35 commits
  2. 16 Oct, 2017 5 commits
    • Chuck Lever's avatar
      xprtrdma: Remove ro_unmap_safe · 2b4f8923
      Chuck Lever authored
      Clean up: There are no remaining callers of this method.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      2b4f8923
    • Chuck Lever's avatar
      xprtrdma: Use ro_unmap_sync in xprt_rdma_send_request · 4ce6c04c
      Chuck Lever authored
      The "safe" version of ro_unmap is used here to avoid waiting
      unnecessarily. However:
      
       - It is safe to wait. After all, we have to wait anyway when using
         FMR to register memory.
      
       - This case is rare: it occurs only after a reconnect.
      
      By switching this call site to ro_unmap_sync, the final use of
      ro_unmap_safe is removed.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      4ce6c04c
    • Chuck Lever's avatar
      xprtrdma: Don't defer fencing an async RPC's chunks · 8f66b1a5
      Chuck Lever authored
      In current kernels, waiting in xprt_release appears to be safe to
      do. I had erroneously believed that for ASYNC RPCs, waiting of any
      kind in xprt_release->xprt_rdma_free would result in deadlock. I've
      done injection testing and consulted with Trond to confirm that
      waiting in the RPC release path is safe.
      
      For the very few times where RPC resources haven't yet been released
      earlier by the reply handler, it is safe to wait synchronously in
      xprt_rdma_free for invalidation rather than defering it to MR
      recovery.
      
      Note: When the QP is error state, posting a LocalInvalidate should
      flush and mark the MR as bad. There is no way the remote HCA can
      access that MR via a QP in error state, so it is effectively already
      inaccessible and thus safe for the Upper Layer to access. The next
      time the MR is used it should be recognized and cleaned up properly
      by frwr_op_map.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      8f66b1a5
    • NeilBrown's avatar
      NFS: remove special-case revalidate in nfs_opendir() · 1fea73ac
      NeilBrown authored
      Commit f5a73672 ("NFS: allow close-to-open cache semantics to
      apply to root of NFS filesystem") added a call to
      __nfs_revalidate_inode() to nfs_opendir to as the lookup
      process wouldn't reliable do this.
      
      Subsequent commit a3fbbde7 ("VFS: we need to set LOOKUP_JUMPED
      on mountpoint crossing") make this unnecessary.  So remove the
      unnecessary code.
      Signed-off-by: default avatarNeilBrown <neilb@suse.com>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      1fea73ac
    • NeilBrown's avatar
      NFS: revalidate "." etc correctly on "open". · b688741c
      NeilBrown authored
      For correct close-to-open semantics, NFS must validate
      the change attribute of a directory (or file) on open.
      
      Since commit ecf3d1f1 ("vfs: kill FS_REVAL_DOT by adding a
      d_weak_revalidate dentry op"), open() of "." or a path ending ".." is
      not revalidated reliably (except when that direct is a mount point).
      
      Prior to that commit, "." was revalidated using nfs_lookup_revalidate()
      which checks the LOOKUP_OPEN flag and forces revalidation if the flag is
      set.
      Since that commit, nfs_weak_revalidate() is used for NFSv3 (which
      ignores the flags) and nothing is used for NFSv4.
      
      This is fixed by using nfs_lookup_verify_inode() in
      nfs_weak_revalidate().  This does the revalidation exactly when needed.
      Also, add a definition of .d_weak_revalidate for NFSv4.
      
      The incorrect behavior is easily demonstrated by running "echo *" in
      some non-mountpoint NFS directory while watching network traffic.
      Without this patch, "echo *" sometimes doesn't produce any traffic.
      With the patch it always does.
      
      Fixes: ecf3d1f1 ("vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op")
      cc: stable@vger.kernel.org (3.9+)
      Signed-off-by: default avatarNeilBrown <neilb@suse.com>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      b688741c