]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
pNFS/filelayout: fix cheking if a layout is striped
authorSagi Grimberg <sagi@grimberg.me>
Wed, 13 May 2026 06:58:24 +0000 (09:58 +0300)
committerAnna Schumaker <anna.schumaker@hammerspace.com>
Mon, 8 Jun 2026 14:21:55 +0000 (10:21 -0400)
commit91668417d4e925c98cae4a55b1b9860380ddbf16
tree3fe1f220cc78b9ac22e6530194f57044e6054f9c
parentea7338471620030582e6a8d3f0fda767fdaee768
pNFS/filelayout: fix cheking if a layout is striped

A layout can still be striped with num_fh = 1 as it is perfectly possible
that both MDS and DSs can handle the same filehandle. Hence check according
to stripe_count > 1, which is the correct check to begin with.

We should not be called with flseg->dsaddr = NULL, but if for some reason
we do, return our best guess with is flseg->num_fh > 1.

Fixes: a6b9d2fa0024 ("pNFS/filelayout: Fix coalescing test for single DS")
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Anna Schumaker <anna.schumaker@hammerspace.com>
fs/nfs/filelayout/filelayout.c