mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <cel@kernel.org>, NeilBrown <neil@brown.name>,
	Olga Kornievskaia <okorniev@redhat.com>,
	Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
	Alexander Viro	 <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>, Jan Kara	 <jack@suse.cz>
Cc: Tom Haynes <loghyr@gmail.com>,
	linux-nfs@vger.kernel.org,  linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v3 0/8] nfsd: more delegated timestamp fixes
Date: Tue, 10 Nov 2026 10:34:50 -0500	[thread overview]
Message-ID: <7ef1bdb584ddeb5a383f8c2f9fef47ff3fba931f.camel@kernel.org> (raw)
In-Reply-To: <20261109-deleg-cb-getattr-times-v3-0-710c7244a6ea@kernel.org>

On Mon, 2026-11-09 at 15:36 -0500, Jeff Layton wrote:
> This version fixes the existing patches and adds some new ones to fix
> problems that agentic review spotted. Note that there is also a
> companion client-side series that fixes some related issues.
> 
> The catch with this version is that we need a fix to
> inode_set_ctime_deleg(), and that lives in fs/inode.c. We'll either need
> to get Christian to take that one or get his blessing to merge it via
> the nfsd tree. It's a pretty small patch, so the latter might be OK.
> 
> Original cover letter follows:
> 
> Chuck recently added a new DELEG27 pynfs test that fails against nfsd.
> These patches fix the behavior of delegated timestamps (again), such
> that DELEG27 now passes.
> 
> I also ran some tests with the git regression testsuite which turns out
> to be very sensitive to timestamp bugs, and that turned up a few more
> server-side bugs.
> 
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> Changes in v3:
> - "Honor delegated timestamps when change and size match":
>   - record applied times from SETATTR too, so a stale CB_GETATTR reply
>     can't move them backward
>   - record ctime from the inode; atime/mtime from the untruncated values
>   - move the vet/record prototypes to nfs4ctl.h
> - "don't stamp over an applied delegated mtime at DELEGRETURN":
>   - share the vetting between SETATTR and CB_GETATTR
>   - set dl_setattr only after the holder's mtime is applied
>   - test dl_setattr under inode_lock at DELEGRETURN
> - "don't vet delegated times against an exclusive-create verifier":
>   also set the floors for read timestamp delegations
> - "mark the delegation written on COPY/CLONE instead of stamping c/mtime":
>   - look up the nfs4_file for every async COPY
>   - remove the now-unused nfsd_update_cmtime_attr()
> - New: fs: check a fine-grained time before clamping a delegated ctime
> - New: nfsd: check a fine-grained time before clamping a delegated mtime
> - New: nfsd: raise delegated time floors after a size-changing SETATTR
> - Kernel-doc, comment and commit message fixes
> - Link to v2: https://lore.kernel.org/r/20261106-deleg-cb-getattr-times-v2-0-8433618ab9a1@kernel.org
> 
> Changes in v2:
> - "Honor delegated timestamps when change and size match" reworked:
>   - set ATTR_FORCE when applying the holder's times
>   - record applied times in dl_[amc]time; vet and record under inode_lock
>   - vet SETATTR's delegated times in nfsd_setattr() under inode_lock
>   - also mark file modified on a holder WRITE whose mtime didn't pass dl_mtime
>   - always report ncf_initial_cinfo as the change attr for timestamp delegations
>   - catch the holder's own server-side changes (SETATTR, xattrs, etc.)
>     via a change attribute saved at grant
>   - log, rather than fail the GETATTR, if applying the holder's times fails
> - New: don't stamp over an applied delegated mtime at DELEGRETURN
> - New: don't vet delegated times against an exclusive-create verifier
> - New: mark the delegation written on COPY/CLONE instead of stamping c/mtime
> - Link to v1: https://lore.kernel.org/r/20261102-deleg-cb-getattr-times-v1-0-ca0326d88623@kernel.org
> 
> ---
> Jeff Layton (8):
>       nfsd: Report vetted delegated timestamps in GETATTR replies
>       nfsd: Honor delegated timestamps when change and size match
>       nfsd: don't stamp over an applied delegated mtime at DELEGRETURN
>       nfsd: don't vet delegated times against an exclusive-create verifier
>       nfsd: mark the delegation written on COPY/CLONE instead of stamping c/mtime
>       fs: check a fine-grained time before clamping a delegated ctime
>       nfsd: check a fine-grained time before clamping a delegated mtime
>       nfsd: raise delegated time floors after a size-changing SETATTR
> 
>  fs/inode.c             |  16 ++-
>  fs/nfsd/nfs4callback.c |   2 +-
>  fs/nfsd/nfs4ctl.h      |  15 +++
>  fs/nfsd/nfs4proc.c     | 101 +++++++++--------
>  fs/nfsd/nfs4state.c    | 292 +++++++++++++++++++++++++++++++++++++------------
>  fs/nfsd/nfs4xdr.c      |  10 +-
>  fs/nfsd/state.h        |   6 +-
>  fs/nfsd/vfs.c          |   6 +
>  fs/nfsd/vfs.h          |   4 +
>  fs/nfsd/xdr4.h         |   9 +-
>  10 files changed, 325 insertions(+), 136 deletions(-)
> ---
> base-commit: d692f252c52b8d1b4bc7481554f314df31ed8249
> change-id: 20261102-deleg-cb-getattr-times-8aa926029b16
> 
> Best regards,

Sashiko found some other problems with this. At this point, I'm fairly
convinced that we need to just redesign how all of this works to be
less racy. I'm still working out the details, but hold off on reviewing
or merging this series for now.

Thanks,
-- 
Jeff Layton <jlayton@kernel.org>

      parent reply	other threads:[~2026-11-10 15:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 20:36 Jeff Layton
2026-11-09 20:36 ` [PATCH v3 1/8] nfsd: Report vetted delegated timestamps in GETATTR replies Jeff Layton
2026-11-09 20:36 ` [PATCH v3 2/8] nfsd: Honor delegated timestamps when change and size match Jeff Layton
2026-11-09 20:36 ` [PATCH v3 3/8] nfsd: don't stamp over an applied delegated mtime at DELEGRETURN Jeff Layton
2026-11-09 20:36 ` [PATCH v3 4/8] nfsd: don't vet delegated times against an exclusive-create verifier Jeff Layton
2026-11-09 20:36 ` [PATCH v3 5/8] nfsd: mark the delegation written on COPY/CLONE instead of stamping c/mtime Jeff Layton
2026-11-09 20:36 ` [PATCH v3 6/8] fs: check a fine-grained time before clamping a delegated ctime Jeff Layton
2026-11-10 11:15   ` Jan Kara
2026-11-09 20:36 ` [PATCH v3 7/8] nfsd: check a fine-grained time before clamping a delegated mtime Jeff Layton
2026-11-09 20:36 ` [PATCH v3 8/8] nfsd: raise delegated time floors after a size-changing SETATTR Jeff Layton
2026-11-10 15:34 ` Jeff Layton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ef1bdb584ddeb5a383f8c2f9fef47ff3fba931f.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=Dai.Ngo@oracle.com \
    --cc=brauner@kernel.org \
    --cc=cel@kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=loghyr@gmail.com \
    --cc=neil@brown.name \
    --cc=okorniev@redhat.com \
    --cc=tom@talpey.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®