diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2013-12-30 21:17:20 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2013-12-30 21:17:20 +0000 |
commit | 72aa8bde0ab2dcfec67ab21c6f41ce262ee128dd (patch) | |
tree | 78952e732a854c42fc7c189ddb90e6a3353f9c75 /sys/nfsclient | |
parent | 955c58790eea066ae0aa598e1f46c9851b2f31fb (diff) | |
download | FreeBSD-src-72aa8bde0ab2dcfec67ab21c6f41ce262ee128dd.zip FreeBSD-src-72aa8bde0ab2dcfec67ab21c6f41ce262ee128dd.tar.gz |
MFC: r259084
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.
Diffstat (limited to 'sys/nfsclient')
-rw-r--r-- | sys/nfsclient/nfsargs.h | 1 |
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 |