mirror_ubuntu-kernels/fs/nfs
Trond Myklebust cd37142ca4 pNFS: Avoid a live lock condition in pnfs_update_layout()
BugLink: https://bugs.launchpad.net/bugs/1983149

[ Upstream commit 880265c77a ]

If we're about to send the first layoutget for an empty layout, we want
to make sure that we drain out the existing pending layoutget calls
first. The reason is that these layouts may have been already implicitly
returned to the server by a recall to which the client gave a
NFS4ERR_NOMATCHING_LAYOUT response.

The problem is that wait_var_event_killable() could in principle see the
plh_outstanding count go back to '1' when the first process to wake up
starts sending a new layoutget. If it fails to get a layout, then this
loop can continue ad infinitum...

Fixes: 0b77f97a7e ("NFSv4/pnfs: Fix layoutget behaviour after invalidation")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
2022-08-26 10:53:26 +02:00
..
blocklayout
filelayout
flexfilelayout
cache_lib.c
cache_lib.h
callback_proc.c pNFS: Avoid a live lock condition in pnfs_update_layout() 2022-08-26 10:53:26 +02:00
callback_xdr.c
callback.c
callback.h
client.c
delegation.c
delegation.h
dir.c
direct.c
dns_resolve.c
dns_resolve.h
export.c
file.c NFS: Do not report flush errors in nfs_write_end() 2022-08-10 09:25:01 +02:00
fs_context.c
fscache-index.c
fscache.c
fscache.h
getroot.c NFS: Create a new nfs_alloc_fattr_with_label() function 2022-08-10 09:25:04 +02:00
inode.c NFS: Convert GFP_NOFS to GFP_KERNEL 2022-08-10 09:25:05 +02:00
internal.h NFS: Create a new nfs_alloc_fattr_with_label() function 2022-08-10 09:25:04 +02:00
io.c
iostat.h
Kconfig
Makefile
mount_clnt.c
namespace.c
netns.h
nfs2super.c
nfs2xdr.c
nfs3_fs.h
nfs3acl.c
nfs3client.c
nfs3proc.c
nfs3super.c
nfs3xdr.c
nfs4_fs.h
nfs4client.c
nfs4file.c
nfs4getroot.c
nfs4idmap.c
nfs4idmap.h
nfs4namespace.c
nfs4proc.c NFSv4: Don't hold the layoutget locks across multiple RPC calls 2022-08-26 10:52:54 +02:00
nfs4renewd.c
nfs4session.c
nfs4session.h
nfs4state.c NFS: Convert GFP_NOFS to GFP_KERNEL 2022-08-10 09:25:05 +02:00
nfs4super.c
nfs4sysctl.c
nfs4trace.c
nfs4trace.h
nfs4xdr.c
nfs42.h
nfs42proc.c
nfs42xattr.c
nfs42xdr.c
nfs.h
nfsroot.c
nfstrace.c
nfstrace.h
pagelist.c NFSv4.1 mark qualified async operations as MOVEABLE tasks 2022-08-10 09:25:05 +02:00
pnfs_dev.c
pnfs_nfs.c
pnfs.c pNFS: Avoid a live lock condition in pnfs_update_layout() 2022-08-26 10:53:26 +02:00
pnfs.h pNFS: Avoid a live lock condition in pnfs_update_layout() 2022-08-26 10:53:26 +02:00
proc.c
read.c
super.c
symlink.c
sysctl.c
sysfs.c
sysfs.h
unlink.c NFSv4.1 mark qualified async operations as MOVEABLE tasks 2022-08-10 09:25:05 +02:00
write.c NFSv4.1 mark qualified async operations as MOVEABLE tasks 2022-08-10 09:25:05 +02:00