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/fs/nfsclient/nfsnode.h | |
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/fs/nfsclient/nfsnode.h')
-rw-r--r-- | sys/fs/nfsclient/nfsnode.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/fs/nfsclient/nfsnode.h b/sys/fs/nfsclient/nfsnode.h index bbb67d7..d5cb756 100644 --- a/sys/fs/nfsclient/nfsnode.h +++ b/sys/fs/nfsclient/nfsnode.h @@ -157,6 +157,7 @@ struct nfsnode { #define NLOCKWANT 0x00010000 /* Want the sleep lock */ #define NNOLAYOUT 0x00020000 /* Can't get a layout for this file */ #define NWRITEOPENED 0x00040000 /* Has been opened for writing */ +#define NHASBEENLOCKED 0x00080000 /* Has been file locked. */ /* * Convert between nfsnode pointers and vnode pointers |