diff options
author | dillon <dillon@FreeBSD.org> | 1999-09-20 19:10:28 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1999-09-20 19:10:28 +0000 |
commit | 00b895590eab4794801adbd3611f3c9f841bd566 (patch) | |
tree | e1ec30e162827099098ba664050c196744909736 | |
parent | e8761b4e052785153d92b664a5dbe32e4a1de18e (diff) | |
download | FreeBSD-src-00b895590eab4794801adbd3611f3c9f841bd566.zip FreeBSD-src-00b895590eab4794801adbd3611f3c9f841bd566.tar.gz |
Add comment to clarify a commit rpc optimization already being performed.
-rw-r--r-- | sys/nfs/nfs_bio.c | 8 | ||||
-rw-r--r-- | sys/nfsclient/nfs_bio.c | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c index 9adaa14..9aa6af5 100644 --- a/sys/nfs/nfs_bio.c +++ b/sys/nfs/nfs_bio.c @@ -1393,6 +1393,14 @@ nfs_doio(bp, cr, p) bp->b_flags |= B_WRITEINPROG; error = nfs_writerpc(vp, uiop, cr, &iomode, &must_commit); + + /* + * When setting B_NEEDCOMMIT also set B_CLUSTEROK to try + * to cluster the buffers needing commit. This will allow + * the system to submit a single commit rpc for the whole + * cluster. + */ + if (!error && iomode == NFSV3WRITE_UNSTABLE) { bp->b_flags |= B_NEEDCOMMIT; if (bp->b_dirtyoff == 0 diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c index 9adaa14..9aa6af5 100644 --- a/sys/nfsclient/nfs_bio.c +++ b/sys/nfsclient/nfs_bio.c @@ -1393,6 +1393,14 @@ nfs_doio(bp, cr, p) bp->b_flags |= B_WRITEINPROG; error = nfs_writerpc(vp, uiop, cr, &iomode, &must_commit); + + /* + * When setting B_NEEDCOMMIT also set B_CLUSTEROK to try + * to cluster the buffers needing commit. This will allow + * the system to submit a single commit rpc for the whole + * cluster. + */ + if (!error && iomode == NFSV3WRITE_UNSTABLE) { bp->b_flags |= B_NEEDCOMMIT; if (bp->b_dirtyoff == 0 |