From: Sergey Bashirov <sergeybashirov@gmail.com>
To: Chuck Lever <chuck.lever@oracle.com>,
Christoph Hellwig <hch@infradead.org>,
Dai Ngo <Dai.Ngo@oracle.com>, Jeff Layton <jlayton@kernel.org>,
NeilBrown <neil@brown.name>,
Olga Kornievskaia <okorniev@redhat.com>,
Tom Talpey <tom@talpey.com>
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Sergey Bashirov <sergeybashirov@gmail.com>
Subject: [PATCH v3 0/4] NFSD: Impl multiple extents in block/scsi layoutget
Date: Fri, 3 Oct 2025 12:11:02 +0300 [thread overview]
Message-ID: <20251003091115.184075-1-sergeybashirov@gmail.com> (raw)
Implement support for multiple extents in the LAYOUTGET response
for two main reasons.
First, it avoids unnecessary RPC calls. For files consisting of many
extents, especially large ones, too many LAYOUTGET requests are observed
in Wireshark traces.
Second, due to the current limitation on returning a single extent,
the client can only reliably request layouts with minimum length set
to 4K. Otherwise, NFS4ERR_LAYOUTUNAVAILABLE may be returned if XFS
allocated a 4K extent within the requested range.
We are using the ability to request layouts with a minimum length
greater than 4K to fix/workaround a bug in the client. I will prepare
the client's patch for review too.
Below is an example of multiple extents in the LAYOUTGET response
captured using Wireshark.
Network File System, Ops(3): SEQUENCE, PUTFH, LAYOUTGET
[Program Version: 4]
[V4 Procedure: COMPOUND (1)]
Tag: <EMPTY>
length: 0
contents: <EMPTY>
minorversion: 2
Operations (count: 3): SEQUENCE, PUTFH, LAYOUTGET
Opcode: SEQUENCE (53)
Opcode: PUTFH (22)
Opcode: LAYOUTGET (50)
layout available?: No
layout type: LAYOUT4_BLOCK_VOLUME (3)
IO mode: IOMODE_RW (2)
offset: 0
length: 10485760
min length: 16384
StateID
maxcount: 4096
[Main Opcode: LAYOUTGET (50)]
Network File System, Ops(3): SEQUENCE PUTFH LAYOUTGET
[Program Version: 4]
[V4 Procedure: COMPOUND (1)]
Status: NFS4_OK (0)
Tag: <EMPTY>
length: 0
contents: <EMPTY>
Operations (count: 3)
Opcode: SEQUENCE (53)
Opcode: PUTFH (22)
Opcode: LAYOUTGET (50)
Status: NFS4_OK (0)
return on close?: Yes
StateID
Layout Segment (count: 1)
offset: 0
length: 385024
IO mode: IOMODE_RW (2)
layout type: LAYOUT4_BLOCK_VOLUME (3)
layout: <DATA>
length: 4052
contents: <DATA>
[Main Opcode: LAYOUTGET (50)]
pNFS Block Layout Extents
bex_count: 92
BEX[0]
BEX[1]
BEX[2]
...
Signed-off-by: Sergey Bashirov <sergeybashirov@gmail.com>
---
Changes in v3:
- Added a Fixes tag
- Removed an unnecessary sentence from the commit message
Sergey Bashirov (4):
NFSD/blocklayout: Fix minlength check in proc_layoutget
NFSD/blocklayout: Extract extent mapping from proc_layoutget
NFSD/blocklayout: Introduce layout content structure
NFSD/blocklayout: Support multiple extents per LAYOUTGET
fs/nfsd/blocklayout.c | 154 +++++++++++++++++++++++++++------------
fs/nfsd/blocklayoutxdr.c | 36 ++++++---
fs/nfsd/blocklayoutxdr.h | 14 ++++
3 files changed, 147 insertions(+), 57 deletions(-)
--
2.43.0
next reply other threads:[~2025-10-03 9:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-03 9:11 Sergey Bashirov [this message]
2025-10-03 9:11 ` [PATCH v3 1/4] NFSD/blocklayout: Fix minlength check in proc_layoutget Sergey Bashirov
2025-10-03 9:11 ` [PATCH v3 2/4] NFSD/blocklayout: Extract extent mapping from proc_layoutget Sergey Bashirov
2025-10-03 9:11 ` [PATCH v3 3/4] NFSD/blocklayout: Introduce layout content structure Sergey Bashirov
2025-10-03 9:11 ` [PATCH v3 4/4] NFSD/blocklayout: Support multiple extents per LAYOUTGET Sergey Bashirov
2025-10-04 17:20 ` [PATCH v3 0/4] NFSD: Impl multiple extents in block/scsi layoutget Chuck Lever
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=20251003091115.184075-1-sergeybashirov@gmail.com \
--to=sergeybashirov@gmail.com \
--cc=Dai.Ngo@oracle.com \
--cc=chuck.lever@oracle.com \
--cc=hch@infradead.org \
--cc=jlayton@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).