kernel-hacking-2024-linux-s.../fs/nfs
NeilBrown e87b4c7a7a NFS: don't use STABLE writes during writeback.
commit b31268ac79
  FS: Use stable writes when not doing a bulk flush

was a bit heavy handed.
The particular problem that lead to this patch was that
small writes to an O_SYNC file we being written as UNSTABLE writes
followed by a commit.
This is appropriate for large writes (which require multiple NFS
requests) but for small writes (single NFS request), using
NFS_FILE_SYNC is more efficient.

So that patch causes the code to select between the two methods
depending on how many nfs requests get generated.

Unfortunately this ends up applying to non O_SYNC writes as well.
In particular if you memory-map a file and update random pages, then
when they are eventually written out by writeback they will go as
NFS_FILE_SYNC.  This is inefficient and slows down the application.

So: only set FLUSH_COND_STABLE when wbc->sync_mode is WB_SYNC_ALL.
With this patch:
 O_SYNC writes are NFS_FILE_SYNC for single requests, and NFS_UNSTABLE
    followed by COMMIT for multiple requests
 Writing immediately before close of fsync follow the same pattern.
 Non-O_SYNC writes without an fsync of close eventually get flushed
 out as UNSTABLE and a commit follows eventually as appropriate.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
2014-09-24 23:23:02 -04:00
..
blocklayout pnfs/blocklayout: Fix a 64-bit division/remainder issue in bl_map_stripe 2014-09-21 14:20:20 -04:00
filelayout pnfs: factor GETDEVICEINFO implementations 2014-09-10 12:47:03 -07:00
objlayout pnfs/objlayout: fix endianess annotation in objio_alloc_deviceid_node 2014-09-12 13:20:43 -04:00
cache_lib.c
cache_lib.h
callback.c nfs4: copy acceptor name from context to nfs_client 2014-07-12 18:41:25 -04:00
callback.h
callback_proc.c pnfs: enable CB_NOTIFY_DEVICEID support 2014-09-12 13:33:50 -04:00
callback_xdr.c
client.c nfs: add __acquires and __releases annotations to seqfile start/stop routines 2014-09-10 12:47:04 -07:00
delegation.c nfs4: add nfs4_check_delegation 2014-07-12 18:22:58 -04:00
delegation.h nfs4: add nfs4_check_delegation 2014-07-12 18:22:58 -04:00
dir.c NFS: fix two problems in lookup_revalidate in RCU-walk 2014-08-04 09:22:08 -04:00
direct.c NFS: Unconditionally enable commit code 2014-09-12 13:49:31 -04:00
dns_resolve.c
dns_resolve.h
file.c nfs: fix RCU cl_xprt handling in nfs_swap_activate/deactivate 2014-09-10 12:47:04 -07:00
fscache-index.c
fscache.c
fscache.h
getroot.c dcache: d_obtain_alias callers don't all want DISCONNECTED 2014-08-07 14:40:10 -04:00
idmap.c Merge branch 'keys-fixes' into keys-next 2014-07-22 21:55:45 +01:00
inode.c nfs: setattr can only change regular file sizes 2014-09-10 12:47:04 -07:00
internal.h NFS: Move v3 declarations out of internal.h 2014-09-12 13:49:40 -04:00
iostat.h
Kconfig
Makefile
mount_clnt.c
namespace.c
netns.h NFS: Fix /proc/fs/nfsfs/servers and /proc/fs/nfsfs/volumes 2014-08-04 09:28:32 -07:00
nfs.h
nfs2super.c
nfs2xdr.c
nfs3_fs.h NFS: Move NFS v3 acl functions to nfs3_fs.h 2014-09-12 13:50:26 -04:00
nfs3acl.c NFSv3: Fix another acl regression 2014-08-26 16:17:48 -04:00
nfs3client.c
nfs3proc.c NFS: Move v3 declarations out of internal.h 2014-09-12 13:49:40 -04:00
nfs3super.c NFS: Move NFS v3 acl functions to nfs3_fs.h 2014-09-12 13:50:26 -04:00
nfs3xdr.c
nfs4_fs.h nfs: revert "nfs4: queue free_lock_state job submission to nfsiod" 2014-09-08 17:00:32 -07:00
nfs4client.c nfsv4: set hostname when creating nfsv4 ds connection 2014-07-08 14:30:03 -04:00
nfs4file.c
nfs4getroot.c
nfs4namespace.c NFSv4: test SECINFO RPC_AUTH_GSS pseudoflavors for support 2014-06-24 18:46:58 -04:00
nfs4proc.c NFSv4: use exponential retry on NFS4ERR_DELAY for async requests. 2014-09-24 23:22:47 -04:00
nfs4renewd.c
nfs4session.c
nfs4session.h
nfs4state.c Fixing lease renewal 2014-09-24 23:03:15 -04:00
nfs4super.c
nfs4sysctl.c
nfs4trace.c
nfs4trace.h nfs: merge nfs_pgio_data into _header 2014-06-24 18:47:00 -04:00
nfs4xdr.c pnfs: enable CB_NOTIFY_DEVICEID support 2014-09-12 13:33:50 -04:00
nfsroot.c
nfstrace.c
nfstrace.h
pagelist.c nfs: cap request size to fit a kmalloced page array 2014-09-10 12:47:01 -07:00
pnfs.c pnfs: add return_range method 2014-09-10 12:47:03 -07:00
pnfs.h nfs41: change PNFS_LAYOUTRET_ON_SETATTR to only return on truncation to smaller size 2014-09-12 14:03:20 -04:00
pnfs_dev.c pnfs: remove GETDEVICELIST implementation 2014-09-12 13:20:54 -04:00
proc.c nfs: merge nfs_pgio_data into _header 2014-06-24 18:47:00 -04:00
read.c nfs: get rid of duplicate dprintk 2014-06-25 19:01:27 -04:00
super.c NFS: Remove v3 not compiled check from validate_mount_data() 2014-09-12 13:50:20 -04:00
symlink.c
sysctl.c
unlink.c
write.c NFS: don't use STABLE writes during writeback. 2014-09-24 23:23:02 -04:00