[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <88e4b40b61f0860c28409bd50e3ae5f1d9c0410b.camel@kernel.org>
Date: Wed, 25 Jun 2025 06:40:07 -0400
From: Jeff Layton <jlayton@...nel.org>
To: Christoph Hellwig <hch@...radead.org>, Yafang Shao <laoar.shao@...il.com>
Cc: david@...morbit.com, djwong@...nel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-xfs@...r.kernel.org, yc1082463@...il.com
Subject: Re: [PATCH] xfs: report a writeback error on a read() call
On Wed, 2025-06-25 at 00:01 -0700, Christoph Hellwig wrote:
> On Wed, Jun 25, 2025 at 10:44:57AM +0800, Yafang Shao wrote:
> > > That's really kernel wide policy and not something magic done by a
> > > single file system.
> >
> > XFS already supports an optional policy for handling metadata errors via:
> > /sys/fs/xfs/<disk>/error/metadata/
> >
> > It would be reasonable to introduce a similar optional policy for data
> > errors:
> > /sys/fs/xfs/<disk>/error/data/
> >
> > This data error policy could allow the filesystem to shut down immediately
> > if corrupted data is detected that might otherwise be exposed to userspace.
>
> I fully agree on that part, and would in fact argue for making it the
> default.
>
> But reporting writeback errors on read just on one file system and with
> a specific option is really strange.
Another option:
We could expose this functionality in preadv2() with a new RWF_WBERR
flag (better names welcome). That way applications could opt-in to
checking for writeback errors like this. With that, the application is
at least explicitly saying that it wants this behavior.
--
Jeff Layton <jlayton@...nel.org>
Powered by blists - more mailing lists