aboutsummaryrefslogtreecommitdiff
path: root/sys/nfsserver
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2011-12-15 02:26:53 +0000
committerXin LI <delphij@FreeBSD.org>2011-12-15 02:26:53 +0000
commitf8dee27442592410c256d8533e4fcadf6b592e4d (patch)
treec317acb0cc0a448cddc48e0acc79cda2388cbb51 /sys/nfsserver
parent3f9bdcef120e35d1201520b5a07f8a59fef1ace8 (diff)
Notes
Diffstat (limited to 'sys/nfsserver')
-rw-r--r--sys/nfsserver/nfs_serv.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c
index 3ee804d962e2..e51c761eee7f 100644
--- a/sys/nfsserver/nfs_serv.c
+++ b/sys/nfsserver/nfs_serv.c
@@ -3454,7 +3454,12 @@ nfsrv_commit(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
}
for_ret = VOP_GETATTR(vp, &bfor, cred);
- if (cnt > MAX_COMMIT_COUNT) {
+ /*
+ * RFC 1813 3.3.21: if count is 0, a flush from offset to the end of file
+ * is done. At this time VOP_FSYNC does not accept offset and byte count
+ * parameters so call VOP_FSYNC the whole file for now.
+ */
+ if (cnt == 0 || cnt > MAX_COMMIT_COUNT) {
/*
* Give up and do the whole thing
*/