* [PATCH 0/2] nfsd: delegated timestamp fix
@ 2025-12-03 15:52 Jeff Layton
2025-12-03 15:52 ` [PATCH 1/2] nfsd: use ATTR_DELEG in nfsd4_finalize_deleg_timestamps() Jeff Layton
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jeff Layton @ 2025-12-03 15:52 UTC (permalink / raw)
To: Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey
Cc: linux-nfs, linux-kernel, Jeff Layton
The first patch fixes a bug I found with delegated timestamps, and the
second makes the warning message that prompted the fix more distinct.
This is probably fine to wait until v7.0, but I think it's safe to take
them sooner since it is a bugfix.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
Jeff Layton (2):
nfsd: use ATTR_DELEG in nfsd4_finalize_deleg_timestamps()
nfsd: prefix notification in nfsd4_finalize_deleg_timestamps() with "nfsd: "
fs/nfsd/nfs4state.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
base-commit: 8c83500a552a34821bf9d865aec5a5588b4cfe7c
change-id: 20251203-nfsd-7-0-9b02ed10e407
Best regards,
--
Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] nfsd: use ATTR_DELEG in nfsd4_finalize_deleg_timestamps()
2025-12-03 15:52 [PATCH 0/2] nfsd: delegated timestamp fix Jeff Layton
@ 2025-12-03 15:52 ` Jeff Layton
2025-12-03 15:52 ` [PATCH 2/2] nfsd: prefix notification in nfsd4_finalize_deleg_timestamps() with "nfsd: " Jeff Layton
2025-12-03 19:16 ` [PATCH 0/2] nfsd: delegated timestamp fix Chuck Lever
2 siblings, 0 replies; 4+ messages in thread
From: Jeff Layton @ 2025-12-03 15:52 UTC (permalink / raw)
To: Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey
Cc: linux-nfs, linux-kernel, Jeff Layton
When finalizing timestamps that have never been updated and preparing to
release the delegation lease, the notify_change() call can trigger a
delegation break, and fail to update the timestamps. When this happens,
there will be messages like this in dmesg:
[ 2709.375785] Unable to update timestamps on inode 00:39:263: -11
Since this code is going to release the lease just after updating the
timestamps, breaking the delegation is undesirable. Fix this by setting
ATTR_DELEG in ia_valid, in order to avoid the delegation break.
Fixes: e5e9b24ab8fa ("nfsd: freeze c/mtime updates with outstanding WRITE_ATTRS delegation")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/nfsd/nfs4state.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 1ef560be2d714c138bc8210d9e7dca50a670a342..b0111104e969057486a4b878fffb84b84ca97b7b 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1226,7 +1226,7 @@ static void put_deleg_file(struct nfs4_file *fp)
static void nfsd4_finalize_deleg_timestamps(struct nfs4_delegation *dp, struct file *f)
{
- struct iattr ia = { .ia_valid = ATTR_ATIME | ATTR_CTIME | ATTR_MTIME };
+ struct iattr ia = { .ia_valid = ATTR_ATIME | ATTR_CTIME | ATTR_MTIME | ATTR_DELEG };
struct inode *inode = file_inode(f);
int ret;
--
2.52.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] nfsd: prefix notification in nfsd4_finalize_deleg_timestamps() with "nfsd: "
2025-12-03 15:52 [PATCH 0/2] nfsd: delegated timestamp fix Jeff Layton
2025-12-03 15:52 ` [PATCH 1/2] nfsd: use ATTR_DELEG in nfsd4_finalize_deleg_timestamps() Jeff Layton
@ 2025-12-03 15:52 ` Jeff Layton
2025-12-03 19:16 ` [PATCH 0/2] nfsd: delegated timestamp fix Chuck Lever
2 siblings, 0 replies; 4+ messages in thread
From: Jeff Layton @ 2025-12-03 15:52 UTC (permalink / raw)
To: Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey
Cc: linux-nfs, linux-kernel, Jeff Layton
Make it distinct that this message comes from nfsd.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/nfsd/nfs4state.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index b0111104e969057486a4b878fffb84b84ca97b7b..22246a1d970c3a1fcf1d821e20edd2ca7b1ed488 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1253,7 +1253,7 @@ static void nfsd4_finalize_deleg_timestamps(struct nfs4_delegation *dp, struct f
if (ret) {
struct inode *inode = file_inode(f);
- pr_notice_ratelimited("Unable to update timestamps on inode %02x:%02x:%lu: %d\n",
+ pr_notice_ratelimited("nfsd: Unable to update timestamps on inode %02x:%02x:%lu: %d\n",
MAJOR(inode->i_sb->s_dev),
MINOR(inode->i_sb->s_dev),
inode->i_ino, ret);
--
2.52.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] nfsd: delegated timestamp fix
2025-12-03 15:52 [PATCH 0/2] nfsd: delegated timestamp fix Jeff Layton
2025-12-03 15:52 ` [PATCH 1/2] nfsd: use ATTR_DELEG in nfsd4_finalize_deleg_timestamps() Jeff Layton
2025-12-03 15:52 ` [PATCH 2/2] nfsd: prefix notification in nfsd4_finalize_deleg_timestamps() with "nfsd: " Jeff Layton
@ 2025-12-03 19:16 ` Chuck Lever
2 siblings, 0 replies; 4+ messages in thread
From: Chuck Lever @ 2025-12-03 19:16 UTC (permalink / raw)
To: NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey, Jeff Layton
Cc: Chuck Lever, linux-nfs, linux-kernel
From: Chuck Lever <chuck.lever@oracle.com>
On Wed, 03 Dec 2025 10:52:14 -0500, Jeff Layton wrote:
> The first patch fixes a bug I found with delegated timestamps, and the
> second makes the warning message that prompted the fix more distinct.
>
> This is probably fine to wait until v7.0, but I think it's safe to take
> them sooner since it is a bugfix.
>
>
> [...]
Applied to nfsd-testing, thanks!
[1/2] nfsd: use ATTR_DELEG in nfsd4_finalize_deleg_timestamps()
commit: f0cba9453ad1a29679bd3d872aee5dd691b84d1d
[2/2] nfsd: prefix notification in nfsd4_finalize_deleg_timestamps() with "nfsd: "
commit: 1f0bbd7fd62f1f00ecf0df3dc53083d2205d994d
--
Chuck Lever
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-12-03 19:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-03 15:52 [PATCH 0/2] nfsd: delegated timestamp fix Jeff Layton
2025-12-03 15:52 ` [PATCH 1/2] nfsd: use ATTR_DELEG in nfsd4_finalize_deleg_timestamps() Jeff Layton
2025-12-03 15:52 ` [PATCH 2/2] nfsd: prefix notification in nfsd4_finalize_deleg_timestamps() with "nfsd: " Jeff Layton
2025-12-03 19:16 ` [PATCH 0/2] nfsd: delegated timestamp fix Chuck Lever
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox