summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2013-12-07 23:05:59 +0000
committerrmacklem <rmacklem@FreeBSD.org>2013-12-07 23:05:59 +0000
commitf24ecdf1041ec511cab3b3b8baf76e2ccccee14a (patch)
tree0aa723900a1c499eef876831ec1579aa2d4eac50 /sys/nfsclient
parent501b59d00c69c464926a4e741004baf3d9185e83 (diff)
downloadFreeBSD-src-f24ecdf1041ec511cab3b3b8baf76e2ccccee14a.zip
FreeBSD-src-f24ecdf1041ec511cab3b3b8baf76e2ccccee14a.tar.gz
For software builds, the NFS client does many small
synchronous (with FILE_SYNC) writes because non-contiguous byte ranges in the same buffer cache block are being written. This patch adds a new mount option "noncontigwr" which allows the non-contiguous byte ranges to be combined, with the dirty byte range becoming the superset of the bytes that are dirty, if the file has not been file locked. This reduces the number of writes significantly for software builds. The only case where this change might break existing applications is where an application is writing non-overlapping byte ranges within the same buffer cache block of a file from multiple clients concurrently. Since such an application would normally do file locking on the file, avoiding the byte range merge for files that have been file locked should be sufficient for most (maybe all?) cases. Submitted by: jhb (earlier version) Reviewed by: kib MFC after: 3 weeks
Diffstat (limited to 'sys/nfsclient')
-rw-r--r--sys/nfsclient/nfsargs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/nfsclient/nfsargs.h b/sys/nfsclient/nfsargs.h
index 9cd8945..e10063f 100644
--- a/sys/nfsclient/nfsargs.h
+++ b/sys/nfsclient/nfsargs.h
@@ -99,5 +99,6 @@ struct nfs_args {
#define NFSMNT_STRICT3530 0x10000000 /* Adhere strictly to RFC3530 */
#define NFSMNT_NOCTO 0x20000000 /* Don't flush attrcache on open */
#define NFSMNT_PNFS 0x40000000 /* Enable pNFS support */
+#define NFSMNT_NONCONTIGWR 0x80000000 /* Enable non-contiguous writes */
#endif
OpenPOWER on IntegriCloud