mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 00/12] nfsd: various delegated timestamp fixes
@ 2026-11-24 19:48 Jeff Layton
  2026-11-24 19:48 ` [PATCH v3 01/12] nfsd: don't hold inode_lock while waiting for a delegation in nfsd_setattr() Jeff Layton
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Jeff Layton @ 2026-11-24 19:48 UTC (permalink / raw)
  To: Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
	Christian Brauner
  Cc: Aurélien Couderc, linux-nfs, linux-kernel, Jeff Layton

v3 fixes two problems in the v2 freeze protection and SETATTR ctime
patches, and adds a patch for the same ctime bug in CB_GETATTR.

While I was reworking NFSD's delegated timestamp support, LLM review
found several bugs in the existing code. This series fixes them.

The timestamp rework is still a work in progress. These fixes can go in
ahead of it.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
Changes in v3:
- nfsd4_finalize_deleg_timestamps(): wait for a thaw on DELEGRETURN
- vet_deleg_attrs(): set dl_setattr on any applied delegated mtime
- nfsd4_deleg_set_times(): likewise set dl_setattr on an applied mtime
- new patch: move ctime when CB_GETATTR applies a delegated mtime
- Link to v2: https://lore.kernel.org/r/20261123-delegts-fixes-v2-0-960ce0fb2fed@kernel.org

Changes in v2:
- nfsd_setattr(): sanitize a fresh copy of the attributes under
  inode_lock on each attempt, since the setid bits a chown must clear
  depend on the current mode
- cb_getattr_update_times(): pin fi_deleg_file for the mount's write
  access, and skip the update once the delegation is unhashed
- nfsd4_deleg_set_times(): set dl_setattr only after notify_change()
  succeeds
- add the missing Signed-off-by to the nfsd_setattr() inode_lock patch
- reword changelogs and comments
- don't use ! operator on cl_minorversion
- Link to v1: https://lore.kernel.org/r/20261120-delegts-fixes-v1-0-c89b37d2d462@kernel.org

---
Jeff Layton (12):
      nfsd: don't hold inode_lock while waiting for a delegation in nfsd_setattr()
      nfsd: take freeze protection before updating delegation timestamps
      nfsd: count a delegation in cl_delegs_in_recall only once
      nfsd: don't grant write delegations to NFSv4.0 clients on CLAIM_PREVIOUS
      nfsd: set ctime when a SETATTR with delegated times changes other attributes
      nfsd: pin the client while a GETATTR holds a conflicting delegation
      nfsd: recall when a CB_GETATTR reply omits the size
      nfsd: apply delegated times in a separate times-only setattr
      nfsd: grant a plain read delegation when timestamps are wanted on a read open
      nfsd: check fi_had_conflict under deleg_lock before hashing a delegation
      nfsd: take the write delegation grant stat before hashing
      nfsd: move ctime when CB_GETATTR applies a delegated mtime

 fs/nfsd/nfs4callback.c |   1 +
 fs/nfsd/nfs4proc.c     | 171 ++++++++++++++++++---------
 fs/nfsd/nfs4state.c    | 313 +++++++++++++++++++++++++++++++++++++------------
 fs/nfsd/nfs4xdr.c      |  56 +++++----
 fs/nfsd/state.h        |   2 +
 fs/nfsd/vfs.c          |  62 +++++-----
 fs/nfsd/vfs.h          |   1 +
 fs/nfsd/xdr4.h         |   3 +
 8 files changed, 426 insertions(+), 183 deletions(-)
---
base-commit: 194069b5ff38d82d302c33a4dd280d948c96cfe6
change-id: 20261120-delegts-fixes-798331d91d8f

Best regards,
-- 
Jeff Layton <jlayton@kernel.org>


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-11-24 20:13 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-24 19:48 [PATCH v3 00/12] nfsd: various delegated timestamp fixes Jeff Layton
2026-11-24 19:48 ` [PATCH v3 01/12] nfsd: don't hold inode_lock while waiting for a delegation in nfsd_setattr() Jeff Layton
2026-11-24 19:48 ` [PATCH v3 02/12] nfsd: take freeze protection before updating delegation timestamps Jeff Layton
2026-11-24 19:48 ` [PATCH v3 03/12] nfsd: count a delegation in cl_delegs_in_recall only once Jeff Layton
2026-11-24 19:48 ` [PATCH v3 04/12] nfsd: don't grant write delegations to NFSv4.0 clients on CLAIM_PREVIOUS Jeff Layton
2026-11-24 19:48 ` [PATCH v3 05/12] nfsd: set ctime when a SETATTR with delegated times changes other attributes Jeff Layton
2026-11-24 19:48 ` [PATCH v3 06/12] nfsd: pin the client while a GETATTR holds a conflicting delegation Jeff Layton
2026-11-24 19:48 ` [PATCH v3 07/12] nfsd: recall when a CB_GETATTR reply omits the size Jeff Layton
2026-11-24 19:48 ` [PATCH v3 08/12] nfsd: apply delegated times in a separate times-only setattr Jeff Layton
2026-11-24 19:48 ` [PATCH v3 09/12] nfsd: grant a plain read delegation when timestamps are wanted on a read open Jeff Layton
2026-11-24 19:48 ` [PATCH v3 10/12] nfsd: check fi_had_conflict under deleg_lock before hashing a delegation Jeff Layton
2026-11-24 19:48 ` [PATCH v3 11/12] nfsd: take the write delegation grant stat before hashing Jeff Layton
2026-11-24 19:48 ` [PATCH v3 12/12] nfsd: move ctime when CB_GETATTR applies a delegated mtime Jeff Layton
2026-11-24 20:13 ` [PATCH v3 00/12] nfsd: various delegated timestamp fixes Chuck Lever

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®