Skip to content

remove deadlock risk with loop-back mounted NFS filesystems

NeilBrown linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2SUNRPC: track when a client connection is routed to the local host.include/linux/sunrpc/clnt.h include/linux/sunrpc/xprt.h net/sunrpc/clnt.c +1 more+36 -02 replies
2/2NFS: avoid deadlocks with loop-back mounted NFS filesystems.fs/nfs/file.c fs/nfs/write.c include/linux/freezer.h +1 more+81 -66 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] remove deadlock risk with loop-back mounted NFS filesystems

Now that the new wait_on_bit code is in the kernel (in 3.17-rc1) these last two patches to support deadlock-free loop-back NFS mounts can be applied (hopefully to go upstream for 3.18-rc1).

A deadlock can happen if nfsd tries to allocate memory, calls ->releasepage() on a page in an NFS filesystem, and nfs_release_page() blocks waiting for the nfsd to confirm the COMMIT.

With this patch nfs_release_page() will not wait more than 100ms for COMMIT to a non-remote nfs fileserver.

Thanks,
NeilBrown

---

NeilBrown (2):
SUNRPC: track when a client connection is routed to the local host.
NFS: avoid deadlocks with loop-back mounted NFS filesystems.

 fs/nfs/file.c               |    2 +
 fs/nfs/write.c              |   72 ++++++++++++++++++++++++++++++++++++++++---
 include/linux/freezer.h     |   10 ++++++
 include/linux/sunrpc/clnt.h |    1 +
 include/linux/sunrpc/xprt.h |    1 +
 include/uapi/linux/nfs_fs.h |    3 ++
 net/sunrpc/clnt.c           |   25 +++++++++++++++
 net/sunrpc/xprtsock.c       |    9 +++++
 8 files changed, 117 insertions(+), 6 deletions(-)
Signature · 1 line
Signature