All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Coddington <ben.coddington@hammerspace.com>
To: Trond Myklebust <trondmy@kernel.org>, Anna Schumaker <anna@kernel.org>
Cc: linux-nfs@vger.kernel.org, Daejun Park <daejun7.park@samsung.com>,
	Christoph Hellwig <hch@lst.de>
Subject: [PATCH v3 0/2] pnfs/blocklayout: report LAYOUTCOMMIT failures
Date: Thu, 29 Oct 2026 15:34:19 -0400	[thread overview]
Message-ID: <cover.1793302358.git.bcodding@hammerspace.com> (raw)

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 has fsync() check for it after the LAYOUTCOMMIT.

Daejun tested the patch 2 approach on v2 in VMs, against an nfsd that
answers a LAYOUTCOMMIT with NFS4ERR_BADLAYOUT; I've only compile-tested
v3.

Changes since v2:
- Patch 1: add Reviewed-by tags.
- Patch 2: leave ->sync alone and check the file's writeback error in
  nfs_file_fsync() after pnfs_sync_inode(), so each fd reports the error
  once and stat() never returns it (Daejun).  This drops the bl_sync()
  move and the raw wb_err read, and Christoph's v2 Reviewed-by.

v2: https://lore.kernel.org/linux-nfs/cover.1792157092.git.bcodding@hammerspace.com/
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 |  3 ++-
 fs/nfs/blocklayout/extent_tree.c | 14 +++++++++++---
 fs/nfs/file.c                    |  3 +++
 3 files changed, 16 insertions(+), 4 deletions(-)


base-commit: a90ee4305c4a5df72c11b31dacfdc76e00fcf78a
-- 
2.53.0


             reply	other threads:[~2026-10-29 19:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20261029193427epcas2p23c4a29bb4ff78e1718bb5eeec0481315@epcms2p1>
2026-10-29 19:34 ` Benjamin Coddington [this message]
2026-10-29 19:34   ` [PATCH v3 1/2] pnfs/blocklayout: don't mark extents committed after a failed LAYOUTCOMMIT Benjamin Coddington
2026-10-29 19:34   ` [PATCH v3 2/2] pnfs/blocklayout: report data lost to " Benjamin Coddington
2026-10-30  3:58     ` Daejun Park
2026-10-30  3:56   ` [PATCH v3 0/2] pnfs/blocklayout: report LAYOUTCOMMIT failures Daejun Park

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=cover.1793302358.git.bcodding@hammerspace.com \
    --to=ben.coddington@hammerspace.com \
    --cc=anna@kernel.org \
    --cc=daejun7.park@samsung.com \
    --cc=hch@lst.de \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trondmy@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.