From: Jeff Layton <jlayton@kernel.org>
To: Scott Mayhew <smayhew@redhat.com>, trondmy@kernel.org, anna@kernel.org
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] NFSv4: Don't check for OPEN feature support in v4.1
Date: Tue, 13 May 2025 15:26:19 -0400 [thread overview]
Message-ID: <4d896153a94f01188ae3928d1e5846becc89f3b4.camel@kernel.org> (raw)
In-Reply-To: <20250430111229.4114991-1-smayhew@redhat.com>
On Wed, 2025-04-30 at 07:12 -0400, Scott Mayhew wrote:
> fattr4_open_arguments is a v4.2 recommended attribute, so we shouldn't
> be sending it to v4.1 servers.
>
> Fixes: cb78f9b7d0c0 ("nfs: fix the fetch of FATTR4_OPEN_ARGUMENTS")
> Signed-off-by: Scott Mayhew <smayhew@redhat.com>
> ---
> fs/nfs/nfs4proc.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index 970f28dbf253..2eb2d750a5f1 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -3967,8 +3967,9 @@ static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *f
> FATTR4_WORD0_CASE_INSENSITIVE |
> FATTR4_WORD0_CASE_PRESERVING;
> if (minorversion)
> - bitmask[2] = FATTR4_WORD2_SUPPATTR_EXCLCREAT |
> - FATTR4_WORD2_OPEN_ARGUMENTS;
> + bitmask[2] = FATTR4_WORD2_SUPPATTR_EXCLCREAT;
> + if (minorversion > 1)
> + bitmask[2] |= FATTR4_WORD2_OPEN_ARGUMENTS;
>
> status = nfs4_call_sync(server->client, server, &msg, &args.seq_args, &res.seq_res, 0);
> if (status == 0) {
I just want to point out that this _shouldn't_ be a problem with a
properly functioning server. The server should just not return the
attribute in the reply rather than returning a hard error or failing
when it doesn't recognize the attribute.
If requesting this was causing a problem, then it's probably indicative
of a server bug.
--
Jeff Layton <jlayton@kernel.org>
prev parent reply other threads:[~2025-05-13 19:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-30 11:12 [PATCH] NFSv4: Don't check for OPEN feature support in v4.1 Scott Mayhew
2025-04-30 12:51 ` Jeff Layton
2025-05-07 14:53 ` Benjamin Coddington
2025-05-13 19:26 ` 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=4d896153a94f01188ae3928d1e5846becc89f3b4.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=anna@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=smayhew@redhat.com \
--cc=trondmy@kernel.org \
/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