[PATCH v2 0/3] NFSD: Fix last write offset handling in layoutcommit

Sergey Bashirov posted 3 patches 2 months, 3 weeks ago
fs/nfsd/blocklayout.c |  5 ++---
fs/nfsd/nfs4proc.c    | 34 ++++++++++++++--------------------
fs/nfsd/nfs4xdr.c     |  2 +-
3 files changed, 17 insertions(+), 24 deletions(-)
[PATCH v2 0/3] NFSD: Fix last write offset handling in layoutcommit
Posted by Sergey Bashirov 2 months, 3 weeks ago
These patches correct the behavior of the pNFS server when the client
sends a layoutcommit without a new file size and with zero number of
block/scsi extents.

Tested manually for the pNFS block layout setup.

Signed-off-by: Sergey Bashirov <sergeybashirov@gmail.com>
---
Changes in v2:
 - The first cleanup patch is unchanged
 - Reworked main patch to guard entire new_size check, improved description
 - Added cleanup patch to decode lc_newoffset as bool

Sergey Bashirov (3):
  NFSD: Minor cleanup in layoutcommit processing
  NFSD: Fix last write offset handling in layoutcommit
  NFSD: Minor cleanup in layoutcommit decoding

 fs/nfsd/blocklayout.c |  5 ++---
 fs/nfsd/nfs4proc.c    | 34 ++++++++++++++--------------------
 fs/nfsd/nfs4xdr.c     |  2 +-
 3 files changed, 17 insertions(+), 24 deletions(-)

-- 
2.43.0
Re: [PATCH v2 0/3] NFSD: Fix last write offset handling in layoutcommit
Posted by Chuck Lever 2 months, 3 weeks ago
From: Chuck Lever <chuck.lever@oracle.com>

On Tue, 15 Jul 2025 18:32:17 +0300, Sergey Bashirov wrote:
> These patches correct the behavior of the pNFS server when the client
> sends a layoutcommit without a new file size and with zero number of
> block/scsi extents.
> 
> Tested manually for the pNFS block layout setup.
> 
> 
> [...]

Applied to nfsd-testing, thanks!

[1/3] NFSD: Minor cleanup in layoutcommit processing
      commit: 2c704299249eb847d0973e8f70e8e8002b805474
[2/3] NFSD: Fix last write offset handling in layoutcommit
      commit: c2c45de297adf669b306f41b0ea11ca7493b63af
[3/3] NFSD: Minor cleanup in layoutcommit decoding
      commit: d3f1ec60bc13851e19876205158a0107d998258d

--
Chuck Lever