]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
nfsd: Fix the NFSv4.2 pNFS MDS server for NFSERR_NOSPC via LayoutError
authorRick Macklem <rmacklem@FreeBSD.org>
Mon, 8 Nov 2021 23:58:00 +0000 (15:58 -0800)
committerRick Macklem <rmacklem@FreeBSD.org>
Wed, 24 Nov 2021 22:35:03 +0000 (14:35 -0800)
commit354988ca3f9db745ce0734ef1bda2daba584f723
tree88edddce06552785b1a1ecf7ddf3799d3f5d9de3
parent3f539826e12e3177655add03f6297f49019ac08b
nfsd: Fix the NFSv4.2 pNFS MDS server for NFSERR_NOSPC via LayoutError

If a pNFS server's DS runs out of disk space, it replies
NFSERR_NOSPC to the client doing writing.  For the Linux
client, it then sends a LayoutError RPC to the MDS server to
tell it about the error and keeps retrying, doing repeated
LayoutGets to the MDS and Write RPCs to the DS.  The Linux client is
"stuck" until disk space on the DS is free'd up unless
a subsequent LayoutGet request is sent a NFSERR_NOSPC
reply.
The looping problem still occurs for NFSv4.1 mounts, but no
fix for this is known at this time.

This patch changes the pNFS MDS server to reply to LayoutGet
operations with NFSERR_NOSPC once a LayoutError reports the
problem, until the DS has available space.  This keeps the Linux
NFSv4.2 from looping.

Found during recent testing because of issues w.r.t. a DS
being out of space found during a recent IEFT NFSv4 working
group testing event.

(cherry picked from commit f8dc06303bac39be53872de7429aa54694b3f86a)
sys/fs/nfs/nfs_var.h
sys/fs/nfs/nfsrvstate.h
sys/fs/nfsserver/nfs_nfsdport.c
sys/fs/nfsserver/nfs_nfsdserv.c
sys/fs/nfsserver/nfs_nfsdsocket.c
sys/fs/nfsserver/nfs_nfsdstate.c