aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/nfs
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2021-03-02 22:18:23 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2021-03-15 19:52:46 +0000
commit960f07a448d01b09595732cf87afe7ba657564b4 (patch)
treedb24e6545dffdf4320b7346ac014b291dedb99e7 /sys/fs/nfs
parentf419fd9ad81707f831a48412ecbc5c958675d38c (diff)
downloadsrc-960f07a448d01b09595732cf87afe7ba657564b4.tar.gz
src-960f07a448d01b09595732cf87afe7ba657564b4.zip
nfsclient: Fix ReadDS/WriteDS/CommitDS nfsstats RPC counts for a NFSv3 DS
During a recent virtual NFSv4 testing event, a bug in the FreeBSD client was detected when doing I/O DS operations on a Flexible File Layout pNFS server. For an NFSv3 DS, the Read/Write/Commit nfsstats were incremented instead of the ReadDS/WriteDS/CommitDS counts. This patch fixes this. Only the RPC counts reported by nfsstat(1) were affected by this bug, the I/O operations were performed correctly. MFC after: 2 weeks (cherry picked from commit c04199affeacbd9e9dda3aaf5ca0b1b180031e78)
Diffstat (limited to 'sys/fs/nfs')
-rw-r--r--sys/fs/nfs/nfsport.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/fs/nfs/nfsport.h b/sys/fs/nfs/nfsport.h
index 8d9f5ac42225..177fcad5443d 100644
--- a/sys/fs/nfs/nfsport.h
+++ b/sys/fs/nfs/nfsport.h
@@ -885,6 +885,7 @@ bool ncl_pager_setsize(struct vnode *vp, u_quad_t *nsizep);
* "out by one" without disastrous consequences.
*/
#define NFSINCRGLOBAL(a) ((a)++)
+#define NFSDECRGLOBAL(a) ((a)--)
/*
* Assorted funky stuff to make things work under Darwin8.