Linux NFS development
 help / color / mirror / Atom feed
* [PATCH 0/2] pnfs/blocklayout: report LAYOUTCOMMIT failures
@ 2026-10-16 11:36 Benjamin Coddington
  2026-10-16 11:36 ` [PATCH 1/2] pnfs/blocklayout: don't mark extents committed after a failed LAYOUTCOMMIT Benjamin Coddington
  2026-10-16 11:36 ` [PATCH 2/2] pnfs/blocklayout: report data lost to " Benjamin Coddington
  0 siblings, 2 replies; 6+ messages in thread
From: Benjamin Coddington @ 2026-10-16 11:36 UTC (permalink / raw)
  To: Trond Myklebust, Anna Schumaker; +Cc: linux-nfs, Daejun Park, Christoph Hellwig

From: Benjamin Coddington <bcodding@hammerspace.com>

Data a block or SCSI layout client writes into unwritten extents becomes
file data only when a LAYOUTCOMMIT succeeds.  A server that has revoked
the layout answers NFS4ERR_BADLAYOUT, nfs4_layoutcommit_done() ignores
it, and fsync() and close() return 0 for data that reads back as
zeroes.  nfsd reaches this through its recall failure path today, and
the layout recall series [1] makes it more likely.

Patch 1 keeps the extents uncommitted when the LAYOUTCOMMIT fails before
its result is decoded.  Patch 2 records a writeback error when extents go
uncommitted and returns it from the block/SCSI ->sync.  The files and
flexfiles layouts are unchanged.

NB: these are compile-tested only; I don't have a setup handy that can
revoke the layout..

[1] https://lore.kernel.org/linux-nfs/20261015-nfsd-layout-recall-v3-0-ba3269f8ca22@samsung.com/

Benjamin Coddington (2):
  pnfs/blocklayout: don't mark extents committed after a failed
    LAYOUTCOMMIT
  pnfs/blocklayout: report data lost to a failed LAYOUTCOMMIT

 fs/nfs/blocklayout/blocklayout.c |  3 ++-
 fs/nfs/blocklayout/extent_tree.c | 14 +++++++++++---
 fs/nfs/pnfs.c                    |  8 +++++++-
 3 files changed, 20 insertions(+), 5 deletions(-)


base-commit: a90ee4305c4a5df72c11b31dacfdc76e00fcf78a
-- 
2.53.0


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

end of thread, other threads:[~2026-10-16 13:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-16 11:36 [PATCH 0/2] pnfs/blocklayout: report LAYOUTCOMMIT failures Benjamin Coddington
2026-10-16 11:36 ` [PATCH 1/2] pnfs/blocklayout: don't mark extents committed after a failed LAYOUTCOMMIT Benjamin Coddington
2026-10-16 12:54   ` Christoph Hellwig
2026-10-16 11:36 ` [PATCH 2/2] pnfs/blocklayout: report data lost to " Benjamin Coddington
2026-10-16 12:56   ` Christoph Hellwig
2026-10-16 13:29     ` Benjamin Coddington

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