Linux NFS development
 help / color / mirror / Atom feed
* [PATCH v2 0/2] pnfs/blocklayout: report LAYOUTCOMMIT failures
@ 2026-10-26 23:27 Benjamin Coddington
  2026-10-26 23:27 ` [PATCH v2 1/2] pnfs/blocklayout: don't mark extents committed after a failed LAYOUTCOMMIT Benjamin Coddington
  2026-10-26 23:27 ` [PATCH v2 2/2] pnfs/blocklayout: report data lost to " Benjamin Coddington
  0 siblings, 2 replies; 5+ messages in thread
From: Benjamin Coddington @ 2026-10-26 23:27 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..

Changes since v1:
- Patch 2: replace pnfs_generic_sync() with bl_sync() in the block
  layout driver (Christoph).
- Patch 2: check the raw wb_err value instead of a sample, so ->sync
  from inode revalidation no longer returns an older unseen writeback
  error from every stat() (sashiko).

v1: https://lore.kernel.org/linux-nfs/cover.1792097970.git.bcodding@hammerspace.com/
[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 | 20 +++++++++++++++++---
 fs/nfs/blocklayout/extent_tree.c | 14 +++++++++++---
 fs/nfs/pnfs.c                    |  7 -------
 fs/nfs/pnfs.h                    |  1 -
 4 files changed, 28 insertions(+), 14 deletions(-)


base-commit: a90ee4305c4a5df72c11b31dacfdc76e00fcf78a
-- 
2.53.0


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

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

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-26 23:27 [PATCH v2 0/2] pnfs/blocklayout: report LAYOUTCOMMIT failures Benjamin Coddington
2026-10-26 23:27 ` [PATCH v2 1/2] pnfs/blocklayout: don't mark extents committed after a failed LAYOUTCOMMIT Benjamin Coddington
2026-10-28 16:18   ` Christoph Hellwig
2026-10-26 23:27 ` [PATCH v2 2/2] pnfs/blocklayout: report data lost to " Benjamin Coddington
2026-10-28 16:18   ` Christoph Hellwig

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