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>
Cc: linux-nfs@vger.kernel.org, Chuck Lever <chuck.lever@oracle.com>
Subject: Re: [PATCH v1 2/3] NFSD: Clear TIME_DELEG in the suppattr_exclcreat bitmap
Date: Fri, 14 Nov 2025 15:45:39 -0500 [thread overview]
Message-ID: <bb00a82952a49f612be772eb5c069f98f70974a1.camel@kernel.org> (raw)
In-Reply-To: <20251114202933.6133-3-cel@kernel.org>
On Fri, 2025-11-14 at 15:29 -0500, Chuck Lever wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
>
> From RFC 8881:
>
> 5.8.1.14. Attribute 75: suppattr_exclcreat
>
> > The bit vector that would set all REQUIRED and RECOMMENDED
> > attributes that are supported by the EXCLUSIVE4_1 method of file
> > creation via the OPEN operation. The scope of this attribute
> > applies to all objects with a matching fsid.
>
> There's nothing in RFC 8881 that states that suppattr_exclcreat is
> or is not allowed to contain bits for attributes that are clear in
> the reported supported_attrs bitmask. But it doesn't make sense for
> an NFS server to indicate that it /doesn't/ implement an attribute,
> but then also indicate that clients /are/ allowed to set that
> attribute using OPEN(create) with EXCLUSIVE4_1.
>
> The FATTR4_WORD2_TIME_DELEG attributes are also not to be allowed
> for OPEN(create) with EXCLUSIVE4_1. It doesn't make sense to set
> a delegated timestamp on a new file.
>
> Fixes: 7e13f4f8d27d ("nfsd: handle delegated timestamps in SETATTR")
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> fs/nfsd/nfs4xdr.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> index 51ef97c25456..8f12dee4c3b5 100644
> --- a/fs/nfsd/nfs4xdr.c
> +++ b/fs/nfsd/nfs4xdr.c
> @@ -3379,6 +3379,8 @@ static __be32 nfsd4_encode_fattr4_suppattr_exclcreat(struct xdr_stream *xdr,
> supp[0] &= ~FATTR4_WORD0_ACL;
> if (!args->contextsupport)
> supp[2] &= ~FATTR4_WORD2_SECURITY_LABEL;
> + supp[2] &= ~FATTR4_WORD2_TIME_DELEG_ACCESS;
> + supp[2] &= ~FATTR4_WORD2_TIME_DELEG_MODIFY;
>
Why not just clear those bits in NFSD_SUPPATTR_EXCLCREAT_WORD2 ?
> supp[0] &= NFSD_SUPPATTR_EXCLCREAT_WORD0;
> supp[1] &= NFSD_SUPPATTR_EXCLCREAT_WORD1;
--
Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2025-11-14 20:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-14 20:29 [PATCH v1 0/3] Update suppattr_exclcreat bitmask Chuck Lever
2025-11-14 20:29 ` [PATCH v1 1/3] NFSD: Clear SECLABEL in the suppattr_exclcreat bitmap Chuck Lever
2025-11-14 20:29 ` [PATCH v1 2/3] NFSD: Clear TIME_DELEG " Chuck Lever
2025-11-14 20:45 ` Jeff Layton [this message]
2025-11-14 20:29 ` [PATCH v1 3/3] NFSD: Clean up nfsd4_check_open_attributes() 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=bb00a82952a49f612be772eb5c069f98f70974a1.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=dai.ngo@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.