kernel_optimize_test/fs/nfs
Trond Myklebust 8acc3e228e pNFS: Avoid a live lock condition in pnfs_update_layout()
[ Upstream commit 880265c77ac415090090d1fe72a188fee71cb458 ]

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: 0b77f97a7e42 ("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>
2022-06-22 14:13:16 +02:00
..
blocklayout
filelayout NFS: fix an incorrect limit in filelayout_decode_layout() 2021-06-03 09:00:35 +02:00
flexfilelayout pnfs/flexfiles: Fix misplaced barrier in nfs4_ff_layout_prepare_ds 2021-11-18 14:04:22 +01:00
cache_lib.c
cache_lib.h
callback_proc.c pNFS: Avoid a live lock condition in pnfs_update_layout() 2022-06-22 14:13:16 +02:00
callback_xdr.c NFS: remove unneeded check in decode_devicenotify_args() 2022-04-08 14:40:27 +02:00
callback.c
callback.h NFSv4.1: Fix uninitialised variable in devicenotify 2022-02-16 12:54:18 +01:00
client.c NFS: Fix initialisation of nfs_client cl_flags field 2022-02-16 12:54:17 +01:00
delegation.c NFSv4: Fix delegation return in cases where we have to retry 2021-07-20 16:05:47 +02:00
delegation.h NFSv4: Fix delegation return in cases where we have to retry 2021-07-20 16:05:47 +02:00
dir.c NFSv4: fix open failure with O_ACCMODE flag 2022-04-13 21:01:04 +02:00
direct.c NFS: swap-out must always use STABLE writes. 2022-04-13 21:01:02 +02:00
dns_resolve.c
dns_resolve.h
export.c
file.c NFS: Do not report flush errors in nfs_write_end() 2022-06-09 10:21:19 +02:00
fs_context.c nfs: fix broken handling of the softreval mount option 2022-05-18 10:23:43 +02:00
fscache-index.c
fscache.c
fscache.h
getroot.c
inode.c Revert "NFSv4: Handle the special Linux file open access mode" 2022-04-13 21:01:04 +02:00
internal.h NFS: Memory allocation failures are not server fatal errors 2022-06-06 08:42:44 +02:00
io.c
iostat.h
Kconfig nfs: fix PNFS_FLEXFILE_LAYOUT Kconfig default 2021-03-30 14:31:49 +02:00
Makefile
mount_clnt.c
namespace.c
netns.h
nfs.h
nfs2super.c
nfs2xdr.c NFS: Return valid errors from nfs2/3_decode_dirent() 2022-04-08 14:40:25 +02:00
nfs3_fs.h
nfs3acl.c
nfs3client.c
nfs3proc.c nfs: fix acl memory leak of posix_acl_create() 2021-07-20 16:05:51 +02:00
nfs3super.c
nfs3xdr.c NFS: Return valid errors from nfs2/3_decode_dirent() 2022-04-08 14:40:25 +02:00
nfs4_fs.h NFSv4 handle port presence in fs_location server string 2022-02-16 12:54:18 +01:00
nfs4client.c nfs: nfs4clinet: check the return value of kstrdup() 2022-02-16 12:54:18 +01:00
nfs4file.c NFSv4: fix open failure with O_ACCMODE flag 2022-04-13 21:01:04 +02:00
nfs4getroot.c
nfs4idmap.c Fix user namespace leak 2021-11-18 14:04:23 +01:00
nfs4idmap.h
nfs4namespace.c NFSv4 handle port presence in fs_location server string 2022-02-16 12:54:18 +01:00
nfs4proc.c NFSv4: Don't hold the layoutget locks across multiple RPC calls 2022-06-14 18:32:38 +02:00
nfs4renewd.c
nfs4session.c
nfs4session.h
nfs4state.c NFSv4: Protect the state recovery thread against direct reclaim 2022-04-13 21:01:01 +02:00
nfs4super.c NFS: Adjust fs_context error logging 2021-01-19 18:27:30 +01:00
nfs4sysctl.c
nfs4trace.c
nfs4trace.h
nfs4xdr.c NFSv4 remove zero number of fs_locations entries error check 2022-02-16 12:54:18 +01:00
nfs42.h
nfs42proc.c NFSv4.2: fix reference count leaks in _nfs42_proc_copy_notify() 2022-04-13 21:01:01 +02:00
nfs42xattr.c
nfs42xdr.c NFSv42: Don't fail clone() unless the OP_CLONE operation failed 2021-12-01 09:19:03 +01:00
nfsroot.c
nfstrace.c
nfstrace.h
pagelist.c NFS: Avoid writeback threads getting stuck in mempool_alloc() 2022-04-13 21:01:03 +02:00
pnfs_dev.c
pnfs_nfs.c NFS: nfsiod should not block forever in mempool_alloc() 2022-04-13 21:01:03 +02:00
pnfs.c pNFS: Avoid a live lock condition in pnfs_update_layout() 2022-06-22 14:13:16 +02:00
pnfs.h pNFS: Avoid a live lock condition in pnfs_update_layout() 2022-06-22 14:13:16 +02:00
proc.c
read.c
super.c
symlink.c
sysctl.c
sysfs.c
sysfs.h
unlink.c
write.c NFS: Don't report errors from nfs_pageio_complete() more than once 2022-06-09 10:21:19 +02:00