Linux NFS development
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Benjamin Coddington <ben.coddington@hammerspace.com>
Cc: Trond Myklebust <trondmy@kernel.org>,
	Anna Schumaker <anna@kernel.org>,
	linux-nfs@vger.kernel.org, Daejun Park <daejun7.park@samsung.com>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH 2/2] pnfs/blocklayout: report data lost to a failed LAYOUTCOMMIT
Date: Fri, 16 Oct 2026 14:56:20 +0200	[thread overview]
Message-ID: <20261016125620.GB5871@lst.de> (raw)
In-Reply-To: <735df39cfa1873f3ed5b20702fb7d7a79cf49fba.1792097970.git.bcodding@hammerspace.com>

On Fri, Oct 16, 2026 at 07:36:39AM -0400, Benjamin Coddington wrote:
> From: Benjamin Coddington <bcodding@hammerspace.com>
> 
> Data written through a block or SCSI layout into PNFS_BLOCK_INVALID_DATA
> extents stays unwritten on the server until a LAYOUTCOMMIT converts
> those extents.  When the LAYOUTCOMMIT fails, ext_tree_mark_committed()
> tags the extents written again so that a later LAYOUTCOMMIT can cover
> them, and reports nothing.  nfs4_layoutcommit_done() also zeroes the
> task status for NFS4ERR_BADLAYOUT, NFS4ERR_BADIOMODE,
> NFS4ERR_DELEG_REVOKED and NFS4ERR_GRACE, so a synchronous LAYOUTCOMMIT
> returns 0 for those.  A server that has revoked the layout answers
> NFS4ERR_BADLAYOUT; once the client drops that layout its extent tree
> goes with it, and fsync() and close() have returned 0 for data that
> reads back as zeroes.
> 
> When ext_tree_mark_committed() puts extents back, record -EIO in the
> mapping's writeback error and the superblock's, and have
> pnfs_generic_sync(), which only the block and SCSI layouts use, return
> an error recorded during its LAYOUTCOMMIT.  The files and flexfiles
> layouts, whose LAYOUTCOMMIT does not decide what a read of the file
> returns, are unchanged.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

Should pnfs_generic_sync move into the blocklayout code as that is
the only user and it thus isn't exactly overly generic?


  reply	other threads:[~2026-10-16 12:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2026-10-16 13:29     ` Benjamin Coddington

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=20261016125620.GB5871@lst.de \
    --to=hch@lst.de \
    --cc=anna@kernel.org \
    --cc=ben.coddington@hammerspace.com \
    --cc=daejun7.park@samsung.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox