mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Zaborowski <andrew.zaborowski@intel.com>
To: linux-nfs@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Trond Myklebust <trondmy@kernel.org>,
	Anna Schumaker <anna@kernel.org>,
	Jeff Layton <jlayton@kernel.org>,
	balrogg@gmail.com
Subject: [RFC][PATCH] nfs: Revert "nfs: fix the fetch of FATTR4_OPEN_ARGUMENTS"
Date: Fri, 18 Apr 2025 03:10:09 +0200	[thread overview]
Message-ID: <20250418011009.1135794-1-andrew.zaborowski@intel.com> (raw)

This mainly reverts commit cb78f9b7d0c0c9f86d8c0ac9c46b8b684d8785a9
which added the requesting of FATTR4_OPEN_ARGUMENTS through
GETATTR_BITMAP to the get server capabilities sequence whenever protocol
version is 4.1 or higher.  This attribute was apparently defined in
RFC9754 as an extension to v4.2, never valid in v4.1, but it is neither
valid for use in OP_GETATTR.  As far as I understand, the client is
supposed to detect support for FATTR4_OPEN_ARGUMENTS using
FATTR4_SUPPORTED_ATTRS only.

In effect this seemed to break v4.1 client, server would return error to
this request.

While there, remove the unneeded initialization of bitmask[0] which is
soon overwritten.  The initialization was added in commit 707f13b3d081
which cb78f9b7d0c0 purported to fix.

Signed-off-by: Andrew Zaborowski <andrew.zaborowski@intel.com>
---
 fs/nfs/nfs4proc.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 970f28dbf253..3003f78e8764 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3943,9 +3943,7 @@ static bool nfs4_server_delegtime_capable(struct nfs4_server_caps_res *res)
 static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle)
 {
 	u32 minorversion = server->nfs_client->cl_minorversion;
-	u32 bitmask[3] = {
-		[0] = FATTR4_WORD0_SUPPORTED_ATTRS,
-	};
+	u32 bitmask[3] = {};
 	struct nfs4_server_caps_arg args = {
 		.fhandle = fhandle,
 		.bitmask = bitmask,
@@ -3967,8 +3965,7 @@ 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;
 
 	status = nfs4_call_sync(server->client, server, &msg, &args.seq_args, &res.seq_res, 0);
 	if (status == 0) {
-- 
2.47.1


             reply	other threads:[~2025-04-18  1:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-18  1:10 Andrew Zaborowski [this message]
2025-04-18  2:02 ` Andrew Zaborowski

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=20250418011009.1135794-1-andrew.zaborowski@intel.com \
    --to=andrew.zaborowski@intel.com \
    --cc=anna@kernel.org \
    --cc=balrogg@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®