I've been looking for an explanation for a similar kind of failure. I
wonder if the core problem is the same as reported here:
https://bugzilla.opensuse.org/show_bug.cgi?id=1209457
Supposedly fixed by the patch posted to linux-nfs here (also attached
after extraction from the SuSE kernel build source RPM):
https://www.spinics.net/lists/linux-nfs/msg86343.html
And merged into the main-line kernel in 5.15.3, see the Changelog here
(specifically under commit "69e0be0efe53fb012f5db32bc328590745cf8f71"):
https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.3
I would be interested to hear whether it makes any difference for the
issue reported in this Debian bug.
--Ken
From 255fc6efacf25d954a986ff058fd9899f322e7d1 Mon Sep 17 00:00:00 2001
From: Trond Myklebust <trond.mykleb...@hammerspace.com>
Date: Tue, 28 Sep 2021 11:15:53 -0400
Subject: [PATCH] NFS: Don't set NFS_INO_DATA_INVAL_DEFER and NFS_INO_INVALID_DATA
Git-commit: 488796ec1e39fb9194cc8175f770823d40fbf0ed
Patch-mainline: v5.16-rc1
References: stable-5.14.19
[ Upstream commit 488796ec1e39fb9194cc8175f770823d40fbf0ed ]
NFS_INO_DATA_INVAL_DEFER and NFS_INO_INVALID_DATA should be considered
mutually exclusive.
Fixes: 1c341b777501 ("NFS: Add deferred cache invalidation for close-to-open consistency violations")
Signed-off-by: Trond Myklebust <trond.mykleb...@hammerspace.com>
Tested-by: Benjamin Coddington <bcodd...@redhat.com>
Reviewed-by: Benjamin Coddington <bcodd...@redhat.com>
Signed-off-by: Sasha Levin <sas...@kernel.org>
Acked-by: Takashi Iwai <ti...@suse.de>
---
fs/nfs/inode.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 6ea1bde33cb6..f9d3ad3acf11 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -210,10 +210,15 @@ void nfs_set_cache_invalid(struct inode *inode, unsigned long flags)
flags &= ~NFS_INO_INVALID_XATTR;
if (flags & NFS_INO_INVALID_DATA)
nfs_fscache_invalidate(inode);
- if (inode->i_mapping->nrpages == 0)
- flags &= ~(NFS_INO_INVALID_DATA|NFS_INO_DATA_INVAL_DEFER);
flags &= ~(NFS_INO_REVAL_PAGECACHE | NFS_INO_REVAL_FORCED);
+
nfsi->cache_validity |= flags;
+
+ if (inode->i_mapping->nrpages == 0)
+ nfsi->cache_validity &= ~(NFS_INO_INVALID_DATA |
+ NFS_INO_DATA_INVAL_DEFER);
+ else if (nfsi->cache_validity & NFS_INO_INVALID_DATA)
+ nfsi->cache_validity &= ~NFS_INO_DATA_INVAL_DEFER;
}
EXPORT_SYMBOL_GPL(nfs_set_cache_invalid);
--
2.26.2