From: Benjamin Coddington <ben.coddington@hammerspace.com>
To: Trond Myklebust <trondmy@kernel.org>, Anna Schumaker <anna@kernel.org>
Cc: linux-nfs@vger.kernel.org,
Jonathan Curley <jcurley@purestorage.com>,
Mike Snitzer <snitzer@kernel.org>,
Jeff Layton <jlayton@kernel.org>
Subject: [PATCH 01/21] pNFS: Fix CB_NOTIFY_DEVICEID CHANGE to consume ndc_immediate
Date: Thu, 13 Aug 2026 16:42:57 -0400 [thread overview]
Message-ID: <b59cd6c4b551436a39d097ce280a18543d312bf1.1786653063.git.bcodding@hammerspace.com> (raw)
In-Reply-To: <cover.1786653063.git.bcodding@hammerspace.com>
decode_devicenotify_args() gated consuming the trailing ndc_immediate
boolean on cbd_layout_type instead of cbd_notify_type. cbd_layout_type
holds the pNFS layout type (e.g. 4 for flexfiles) and is never equal to
NOTIFY_DEVICEID4_CHANGE (2), so ndc_immediate was never consumed: it was
silently lost for a single CHANGE, and a multi-item cnda_changes<> array
misaligned after the first item and failed with NFS4ERR_INVAL/BADXDR.
Key the decode off the notification type.
Fixes: 1be5683b03a7 ("pnfs: CB_NOTIFY_DEVICEID")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Benjamin Coddington <bcodding@hammerspace.com>
---
fs/nfs/callback_xdr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
index 4382baddc9ee..04af8b9078a0 100644
--- a/fs/nfs/callback_xdr.c
+++ b/fs/nfs/callback_xdr.c
@@ -312,7 +312,7 @@ __be32 decode_devicenotify_args(struct svc_rqst *rqstp,
memcpy(dev->cbd_dev_id.data, p, NFS4_DEVICEID4_SIZE);
p += XDR_QUADLEN(NFS4_DEVICEID4_SIZE);
- if (dev->cbd_layout_type == NOTIFY_DEVICEID4_CHANGE) {
+ if (dev->cbd_notify_type == NOTIFY_DEVICEID4_CHANGE) {
p = xdr_inline_decode(xdr, sizeof(uint32_t));
if (unlikely(p == NULL)) {
status = htonl(NFS4ERR_BADXDR);
--
2.53.0
next prev parent reply other threads:[~2026-08-13 20:43 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 20:42 [PATCH 00/21] NFS: flexfiles device notifications and caching for wide striped layouts Benjamin Coddington
2026-08-13 20:42 ` Benjamin Coddington [this message]
2026-08-13 20:42 ` [PATCH 02/21] NFSv4/flexfiles: Use the full 64-bit offset for read DS selection Benjamin Coddington
2026-08-13 20:42 ` [PATCH 03/21] NFSv4/flexfiles: Bound page coalescing on the absolute stripe offset Benjamin Coddington
2026-08-13 20:43 ` [PATCH 04/21] NFSv4/filelayout: Anchor page coalescing on pattern_offset Benjamin Coddington
2026-08-13 20:43 ` [PATCH 05/21] NFSv4/flexfiles: Reference the device node across DS setup Benjamin Coddington
2026-08-13 20:43 ` [PATCH 06/21] NFSv4/flexfiles: Carry the device node reference across each I/O Benjamin Coddington
2026-08-13 20:43 ` [PATCH 07/21] NFSv4/flexfiles: Hold a device node reference for layoutstats encoding Benjamin Coddington
2026-08-13 20:43 ` [PATCH 08/21] NFSv4/flexfiles: Make the pinned device node pointer RCU-managed Benjamin Coddington
2026-08-13 20:43 ` [PATCH 09/21] pNFS: Add a reresolve_deviceid layout driver hook Benjamin Coddington
2026-08-13 20:43 ` [PATCH 10/21] NFSv4/flexfiles: Implement in-place device re-resolve on CHANGE Benjamin Coddington
2026-08-13 20:43 ` [PATCH 11/21] NFSv4: Dispatch CB_NOTIFY_DEVICEID CHANGE to an in-place refresh Benjamin Coddington
2026-08-13 20:43 ` [PATCH 12/21] NFSv4/flexfiles: Honor ndc_immediate on CB_NOTIFY_DEVICEID CHANGE Benjamin Coddington
2026-08-13 20:43 ` [PATCH 13/21] pNFS: Discard a GETDEVICEINFO reply that raced a CHANGE notification Benjamin Coddington
2026-08-13 20:43 ` [PATCH 14/21] pNFS: Add deviceid reference query and collection walkers Benjamin Coddington
2026-08-13 20:43 ` [PATCH 15/21] NFSv4/pnfs: Recover revoked layouts on a deleted deviceID Benjamin Coddington
2026-08-13 20:43 ` [PATCH 16/21] NFSv4/pnfs: Confirm a deviceID delete via GETDEVICEINFO Benjamin Coddington
2026-08-13 20:43 ` [PATCH 17/21] NFSv4/pnfs: Dispatch CB_NOTIFY_DEVICEID DELETE to race recovery Benjamin Coddington
2026-08-13 20:43 ` [PATCH 18/21] NFSv4/pnfs: Grow the deviceid cache hash table Benjamin Coddington
2026-08-13 20:43 ` [PATCH 19/21] NFSv4/pnfs: Re-home the data-server cache onto hash buckets Benjamin Coddington
2026-08-13 20:43 ` [PATCH 20/21] NFSv4/pnfs: Key the data-server cache by its address set Benjamin Coddington
2026-08-13 20:43 ` [PATCH 21/21] NFSv4/flexfiles: Add a dataserver_nconnect cap Benjamin Coddington
2026-08-14 14:35 ` [PATCH 00/21] NFS: flexfiles device notifications and caching for wide striped layouts Benjamin Coddington
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=b59cd6c4b551436a39d097ce280a18543d312bf1.1786653063.git.bcodding@hammerspace.com \
--to=ben.coddington@hammerspace.com \
--cc=anna@kernel.org \
--cc=jcurley@purestorage.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=snitzer@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 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.