From: Olga Kornievskaia <aglo@umich.edu>
To: Chuck Lever <cel@kernel.org>
Cc: Olga Kornievskaia <okorniev@redhat.com>,
Chuck Lever <chuck.lever@oracle.com>,
Jeff Layton <jlayton@kernel.org>,
linux-nfs@vger.kernel.org, neilb@brown.name,
Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Subject: Re: [PATCH v2 1/3] nfsd: update mtime/ctime on CLONE in presense of delegated attributes
Date: Thu, 9 Apr 2026 10:12:23 -0400 [thread overview]
Message-ID: <CAN-5tyF-XjJ7n4rPDU_1ndR-_N9Say9QdeDty8JZ8ZDwPNng6g@mail.gmail.com> (raw)
In-Reply-To: <a8ca4c64-af78-42c5-9a59-78dd27b8d022@app.fastmail.com>
On Wed, Apr 8, 2026 at 7:12 PM Chuck Lever <cel@kernel.org> wrote:
>
>
> On Wed, Apr 8, 2026, at 3:00 PM, Olga Kornievskaia wrote:
> > When delegated attributes are given on open, the file is opened with
> > NOCMTIME and modifying operations do not update mtime/ctime as to not get
> > out-of-sync with the client's delegated view. However, for CLONE operation,
> > the server should update its view of mtime/ctime and reflect that in any
> > GETATTR queries.
> >
> > Fixes: e5e9b24ab8fa ("nfsd: freeze c/mtime updates with outstanding
> > WRITE_ATTRS delegation")
> > Signed-off-by: Olga Kornievskaia <okorniev@redhat.com>
>
> b/fs/nfsd/nfs4proc.c
> > index 99b44b6ec056..1272f2eb5ff4 100644
> > --- a/fs/nfsd/nfs4proc.c
> > +++ b/fs/nfsd/nfs4proc.c
> > @@ -1396,6 +1396,17 @@ nfsd4_verify_copy(struct svc_rqst *rqstp, struct
> > nfsd4_compound_state *cstate,
> > goto out;
> > }
> >
> > +static void nfsd_update_cmtime_attr(struct dentry *dentry)
> > +{
> > + struct iattr attr = {
> > + .ia_valid = ATTR_CTIME | ATTR_MTIME | ATTR_DELEG,
> > + };
> > +
> > + inode_lock(d_inode(dentry));
> > + notify_change(&nop_mnt_idmap, dentry, &attr, NULL);
> > + inode_unlock(d_inode(dentry));
> > +}
>
> nfsd4_finalize_deleg_timestamps() invokes the same call and logs
> failures. notify_change() can fail through security_inode_setattr()
> or the filesystem's ->setattr method. Is it worth logging the
> failure (or adding a trace point)? (I don't really know, just
> asking here).
Well, I'm now thinking of stripping out that piece that calls
notify_change() in nfsd4_finalize_deleg_timestamps() into its own
function and call it from both places?
Now that I see that nfsd4_finalize_deleg_timestamps() gets a dentry
from file->fh_path.dentry, I'm thinking I don't need to save a dentry
in the copy case and get it from
copy->nf_dst->nf_file->fh_path.dentry? I'm assuming then I no longer
need to dget/dput then?
>
>
> --
> Chuck Lever
>
next prev parent reply other threads:[~2026-04-09 14:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 19:00 [PATCH v2 0/3] nfsd update mtime/ctime on CLONE/COPY with delegated attritutes Olga Kornievskaia
2026-04-08 19:00 ` [PATCH v2 1/3] nfsd: update mtime/ctime on CLONE in presense of delegated attributes Olga Kornievskaia
2026-04-08 23:07 ` Chuck Lever
2026-04-09 14:12 ` Olga Kornievskaia [this message]
2026-04-08 19:00 ` [PATCH v2 2/3] nfsd: update mtime/ctime on synchronous COPY with " Olga Kornievskaia
2026-04-08 19:00 ` [PATCH v2 3/3] nfsd: update mtime/ctime on asynchronous " Olga Kornievskaia
2026-04-08 23:11 ` Chuck Lever
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=CAN-5tyF-XjJ7n4rPDU_1ndR-_N9Say9QdeDty8JZ8ZDwPNng6g@mail.gmail.com \
--to=aglo@umich.edu \
--cc=Dai.Ngo@oracle.com \
--cc=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@brown.name \
--cc=okorniev@redhat.com \
--cc=tom@talpey.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).