mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] NFSv4/pNFS: don't trust inode size from MDS while LAYOUTCOMMIT is outstanding
@ 2026-10-08 22:28 Lucheng Bao
  2026-10-08 22:28 ` [PATCH 1/2] NFSv4/pNFS: prevent i_size regression while layoutcommit " Lucheng Bao
  2026-10-08 22:28 ` [PATCH 2/2] NFSv4/pNFS: defer LAYOUTRETURN after an unsuccessful OLD_STATEID refresh Lucheng Bao
  0 siblings, 2 replies; 4+ messages in thread
From: Lucheng Bao @ 2026-10-08 22:28 UTC (permalink / raw)
  To: linux-nfs, Trond Myklebust, Anna Schumaker
  Cc: linux-kernel, tmenninger, jcurley, Lucheng Bao

When a layout requires LAYOUTCOMMIT, the size reported by the MDS may stay
stale until the commit is processed. The client already keeps i_size
from shrinking while writes are outstanding. This series extends that
protection to an outstanding LAYOUTCOMMIT.

Patch 1 rejects smaller sizes while a LAYOUTCOMMIT is pending or in
flight.

Patch 2 defers a LAYOUTRETURN whose OLD_STATEID refresh fails because a
newer segment is busy. Today that return is treated as complete and the
pending LAYOUTCOMMIT is discarded.

Without this series, a stale OPEN or CLOSE reply can lower i_size, and
the next O_APPEND write then lands at the old offset.

Lucheng Bao (2):
  NFSv4/pNFS: prevent i_size regression while layoutcommit is outstanding
  NFSv4/pNFS: defer LAYOUTRETURN after an unsuccessful OLD_STATEID refresh

 fs/nfs/inode.c    | 8 ++++++--
 fs/nfs/nfs4proc.c | 3 ++-
 2 files changed, 8 insertions(+), 3 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-09  4:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08 22:28 [PATCH 0/2] NFSv4/pNFS: don't trust inode size from MDS while LAYOUTCOMMIT is outstanding Lucheng Bao
2026-10-08 22:28 ` [PATCH 1/2] NFSv4/pNFS: prevent i_size regression while layoutcommit " Lucheng Bao
2026-10-09  4:43   ` Trond Myklebust
2026-10-08 22:28 ` [PATCH 2/2] NFSv4/pNFS: defer LAYOUTRETURN after an unsuccessful OLD_STATEID refresh Lucheng Bao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®