linux-mainline/fs/nfs
Trond Myklebust dcd21b609d NFS: Avoid flushing data while holding directory locks in nfs_rename()
The Linux client assumes that all filehandles are non-volatile for
renames within the same directory (otherwise sillyrename cannot work).
However, the existence of the Linux 'subtree_check' export option has
meant that nfs_rename() has always assumed it needs to flush writes
before attempting to rename.

Since NFSv4 does allow the client to query whether or not the server
exhibits this behaviour, and since knfsd does actually set the
appropriate flag when 'subtree_check' is enabled on an export, it
should be OK to optimise away the write flushing behaviour in the cases
where it is clearly not needed.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
2025-05-16 22:31:35 +02:00
..
blocklayout
filelayout nfs: don't share pNFS DS connections between net namespaces 2025-04-27 23:25:44 -04:00
flexfilelayout nfs: don't share pNFS DS connections between net namespaces 2025-04-27 23:25:44 -04:00
cache_lib.c
cache_lib.h
callback_proc.c NFS: CB_OFFLOAD can return NFS4ERR_DELAY 2025-01-21 11:34:50 -05:00
callback_xdr.c nfsd: don't use sv_nrthreads in connection limiting calculations. 2025-01-06 09:37:36 -05:00
callback.c nfsd: don't use sv_nrthreads in connection limiting calculations. 2025-01-06 09:37:36 -05:00
callback.h
client.c NFS: Avoid flushing data while holding directory locks in nfs_rename() 2025-05-16 22:31:35 +02:00
delegation.c NFSv4: Check for delegation validity in nfs_start_delegation_return_locked() 2025-03-28 16:38:05 -04:00
delegation.h NFSv4: Fix a deadlock when recovering state on a sillyrenamed file 2025-02-19 16:45:24 -05:00
dir.c NFS: Avoid flushing data while holding directory locks in nfs_rename() 2025-05-16 22:31:35 +02:00
direct.c nfs: direct: drop useless initializer in nfs_direct_write_completion() 2025-04-27 23:25:44 -04:00
dns_resolve.c
dns_resolve.h
export.c nfsd: disallow file locking and delegations for NFSv4 reexport 2025-03-10 09:11:08 -04:00
file.c NFS: fix nfs_release_folio() to not deadlock via kcompactd writeback 2025-03-05 21:36:15 -08:00
fs_context.c NFS: Add a mount option to make ENETUNREACH errors fatal 2025-03-21 12:44:09 -04:00
fscache.c netfs: Drop the was_async arg from netfs_read_subreq_terminated() 2024-12-20 22:34:03 +01:00
fscache.h netfs: Drop the was_async arg from netfs_read_subreq_terminated() 2024-12-20 22:34:03 +01:00
getroot.c
inode.c NFS: Don't allow waiting for exiting tasks 2025-03-28 16:38:02 -04:00
internal.h nfsd-6.15 fixes: 2025-04-19 10:38:03 -07:00
io.c
iostat.h
Kconfig nfs: add missing selections of CONFIG_CRC32 2025-04-13 16:39:42 -04:00
localio.c NFS/localio: Fix a race in nfs_local_open_fh() 2025-04-28 09:50:50 -07:00
Makefile
mount_clnt.c
namespace.c nfs: fix ->d_revalidate() UAF on ->d_name accesses 2025-01-27 19:25:24 -05:00
netns.h nfs: move the nfs4_data_server_cache into struct nfs_net 2025-04-27 23:25:44 -04:00
nfs2super.c
nfs2xdr.c
nfs3_fs.h
nfs3acl.c nfs: nfs3acl: drop useless assignment in nfs3_get_acl() 2025-04-27 23:25:44 -04:00
nfs3client.c pNFS/flexfiles: Treat ENETUNREACH errors as fatal in containers 2025-03-21 12:44:24 -04:00
nfs3proc.c NFS client updates for Linux 6.15 2025-04-02 17:06:31 -07:00
nfs3super.c
nfs3xdr.c
nfs4_fs.h
nfs4client.c pNFS/flexfiles: Treat ENETUNREACH errors as fatal in containers 2025-03-21 12:44:24 -04:00
nfs4file.c
nfs4getroot.c
nfs4idmap.c
nfs4idmap.h
nfs4namespace.c
nfs4proc.c nfs: handle failure of nfs_get_lock_context in unlock path 2025-04-27 23:25:44 -04:00
nfs4renewd.c
nfs4session.c
nfs4session.h nfs: add missing selections of CONFIG_CRC32 2025-04-13 16:39:42 -04:00
nfs4state.c NFSv4: Treat ENETUNREACH errors as fatal for state recovery 2025-03-26 12:19:58 -04:00
nfs4super.c
nfs4sysctl.c treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
nfs4trace.c
nfs4trace.h pNFS/flexfiles: Record the RPC errors in the I/O tracepoints 2025-04-27 23:25:44 -04:00
nfs4xdr.c NFS: Implement NFSv4.2's OFFLOAD_STATUS XDR 2025-03-17 16:51:53 -04:00
nfs42.h
nfs42proc.c NFS: Refactor trace_nfs4_offload_cancel 2025-03-17 16:51:53 -04:00
nfs42xattr.c
nfs42xdr.c NFS: Implement NFSv4.2's OFFLOAD_STATUS XDR 2025-03-17 16:51:53 -04:00
nfs.h
nfsroot.c
nfstrace.c
nfstrace.h nfs/localio: remove redundant code and simplify LOCALIO enablement 2025-01-14 17:05:10 -05:00
pagelist.c nfs: cache all open LOCALIO nfsd_file(s) in client 2025-01-14 17:04:05 -05:00
pnfs_dev.c
pnfs_nfs.c nfs: move the nfs4_data_server_cache into struct nfs_net 2025-04-27 23:25:44 -04:00
pnfs.c NFS/pnfs: Fix the error path in pnfs_layoutreturn_retry_later_locked() 2025-05-16 22:31:35 +02:00
pnfs.h nfs: don't share pNFS DS connections between net namespaces 2025-04-27 23:25:44 -04:00
proc.c nfs: change mkdir inode_operation to return alternate dentry if needed. 2025-03-05 11:52:50 +01:00
read.c
super.c NFS: Add a mount option to make ENETUNREACH errors fatal 2025-03-21 12:44:09 -04:00
symlink.c
sysctl.c treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
sysfs.c NFS: Shut down the nfs_client only after all the superblocks 2025-03-26 12:17:48 -04:00
sysfs.h
unlink.c
write.c nfs: Add missing release on error in nfs_lock_and_join_requests() 2025-04-02 09:53:16 -04:00