From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Yafang Shao <laoar.shao@gmail.com>,
Jeff Layton <jlayton@kernel.org>,
djwong@kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org,
yc1082463@gmail.com
Subject: Re: [PATCH] xfs: report a writeback error on a read() call
Date: Fri, 27 Jun 2025 08:22:53 +1000 [thread overview]
Message-ID: <aF3IPcneKbUe9IdH@dread.disaster.area> (raw)
In-Reply-To: <aF0gEWcA6bX1eNzU@infradead.org>
On Thu, Jun 26, 2025 at 03:25:21AM -0700, Christoph Hellwig wrote:
> On Thu, Jun 26, 2025 at 01:57:59PM +1000, Dave Chinner wrote:
> > writeback errors. Because scientists and data analysts that wrote
> > programs to chew through large amounts of data didn't care about
> > persistence of their data mid-processing. They just wanted what they
> > wrote to be there the next time the processing pipeline read it.
>
> That's only going to work if your RAM is as large as your permanent
> storage :)
No, the old behaviour worked just fine with data sets larger than
RAM. When there is a random writeback error in a big data stream,
only those pages remained dirty and so never get tossed out of RAM. Hence
when a re-read of that file range occurred, the data was already in
RAM and the read succeeded, regardless of the fact that writeback
has been failing.
IOWs the behavioural problems that the user is reporting are present
because we got rid of the historic XFS writeback error handling
(leave the dirty pages in RAM and retry again later) and replaced it
with the historic Linux behaviour (toss the data out and mark the
mapping with an error).
The result of this change is exactly what the OP is having problems
with - reread of a range that had a writeback failure returns zeroes
or garbage, not the original data. If we kept the original XFS
behaviour, the user applications would handle these flakey writeback
failures just fine...
Put simply: we used to have more robust writeback failure handling
than we do now. That could (and probably should) be considered a
regression....
-Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2025-06-26 22:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-22 12:32 [PATCH] xfs: report a writeback error on a read() call ying chen
2025-06-24 14:14 ` Christoph Hellwig
2025-06-24 18:26 ` Jeff Layton
2025-06-24 19:56 ` Matthew Wilcox
2025-06-24 20:25 ` Jeff Layton
2025-06-25 2:44 ` Yafang Shao
2025-06-25 7:01 ` Christoph Hellwig
2025-06-25 10:40 ` Jeff Layton
2025-06-25 11:21 ` Christoph Hellwig
2025-06-25 11:49 ` Jeff Layton
2025-06-25 11:56 ` Christoph Hellwig
2025-06-25 14:06 ` Jeff Layton
2025-06-26 2:41 ` Yafang Shao
2025-06-26 3:57 ` Dave Chinner
2025-06-26 10:25 ` Christoph Hellwig
2025-06-26 22:22 ` Dave Chinner [this message]
2025-06-27 21:19 ` Matthew Wilcox
2025-06-26 10:23 ` Christoph Hellwig
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=aF3IPcneKbUe9IdH@dread.disaster.area \
--to=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=hch@infradead.org \
--cc=jlayton@kernel.org \
--cc=laoar.shao@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=yc1082463@gmail.com \
/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.