From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <chuck.lever@oracle.com>, 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, linux-kernel@vger.kernel.org,
Christoph Hellwig <hch@lst.de>, Jeff Layton <jlayton@kernel.org>
Subject: [PATCH] nfsd: fix handling of NFSEXP_PNFS in the netlink codepath
Date: Tue, 14 Apr 2026 07:18:05 -0700 [thread overview]
Message-ID: <20260414-pnfs-exp-fix-v1-1-9face14c16c2@kernel.org> (raw)
The rework of how block layouts were checked moved the check for
NFSEXP_PNFS out of nfsd4_setup_layout_type() and into the callers. That
patch didn't account for the new call in nfsd4_setup_layout_type().
Cc: Christoph Hellwig <hch@lst.de>
Fixes: f85460b2aa22 ("exportfs,nfsd: rework checking for layout-based block device access support")
Reported-by: Olga Kornievskaia <okorniev@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
This patch needs to go into Chuck's nfsd-testing branch, ideally folded
into the patch in the Fixes: line. Otherwise, pnfs is enabled on every
xfs export discovered via netlink.
---
fs/nfsd/export.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index e6a250576048..f562d383439b 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -1017,7 +1017,8 @@ static int nfsd_nl_parse_one_export(struct cache_detail *cd,
goto out_uuid;
err = 0;
- nfsd4_setup_layout_type(&exp);
+ if (exp.ex_flags & NFSEXP_PNFS)
+ nfsd4_setup_layout_type(&exp);
}
expp = svc_export_lookup(&exp);
---
base-commit: b858b275543b35cb0fc2bf863da017de92ef192b
change-id: 20260414-pnfs-exp-fix-b1eb96d05634
Best regards,
--
Jeff Layton <jlayton@kernel.org>
next reply other threads:[~2026-04-14 14:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-14 14:18 Jeff Layton [this message]
2026-04-14 21:13 ` [PATCH] nfsd: fix handling of NFSEXP_PNFS in the netlink codepath Chuck Lever
2026-04-15 5:29 ` Christoph Hellwig
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=20260414-pnfs-exp-fix-v1-1-9face14c16c2@kernel.org \
--to=jlayton@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=chuck.lever@oracle.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox