diff mbox series

[2/2] nfsd: note inadequate stats locking

Message ID 1558125237-21030-2-git-send-email-bfields@redhat.com (mailing list archive)
State New, archived
Headers show
Series [1/2] nfsd4: drc containerization | expand

Commit Message

Bruce Fields May 17, 2019, 8:33 p.m. UTC
From: "J. Bruce Fields" <bfields@redhat.com>

After 89a26b3d295d "nfsd: split DRC global spinlock into per-bucket
locks", there is no longer a single global spinlock to protect these
stats.

So, really we need to fix that.  For now, at least fix the comment.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
 fs/nfsd/netns.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/fs/nfsd/netns.h b/fs/nfsd/netns.h
index 4146dca94c5f..e01c22fd1485 100644
--- a/fs/nfsd/netns.h
+++ b/fs/nfsd/netns.h
@@ -144,8 +144,11 @@  struct nfsd_net {
 	unsigned int             drc_hashsize;
 
 	/*
-	 * Stats and other tracking of on the duplicate reply cache. All of these and
-	 * the "rc" fields in nfsdstats are protected by the cache_lock
+	 * Stats and other tracking of on the duplicate reply cache.
+	 * These fields and the "rc" fields in nfsdstats are modified
+	 * with only the per-bucket cache lock, which isn't really safe
+	 * and should be fixed if we want the statistics to be
+	 * completely accurate.
 	 */
 
 	/* total number of entries */