From: Jeff Layton <jlayton@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Yafang Shao <laoar.shao@gmail.com>,
david@fromorbit.com, 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: Wed, 25 Jun 2025 07:49:31 -0400 [thread overview]
Message-ID: <6ac46aa32eee969d9d8bc55be035247e3fdc0ac8.camel@kernel.org> (raw)
In-Reply-To: <aFvbr6H3WUyix2fR@infradead.org>
On Wed, 2025-06-25 at 04:21 -0700, Christoph Hellwig wrote:
> On Wed, Jun 25, 2025 at 06:40:07AM -0400, Jeff Layton wrote:
> > 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.
>
> That sounds like a really strange interface to me.
>
> I have to admit I don't fully understand the use case where an
> application cares about these errors, but also doesn't use f(data)sync
> or sync(fs) to actually persist the data. If we can come up with a
> coherent use case for that we should simply add a new syscall or fcntl
> to query the delayed writeback errors instead of overloading other
> interfaces.
It is weird, but I do sort of get the motivation.
In a some cases you want to be able to stream writes as fast as
possible and let the kernel lazily write that back (because you don't
want to block a thread), but knowing if a prior writeback error has
occurred is a good thing too.
Another idea: add a new generic ioctl() that checks for writeback
errors without syncing anything. That would be fairly simple to do and
sounds like it would be useful, but I'd want to hear a better
description of the use-case before we did anything like that.
--
Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2025-06-25 11:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-22 12:32 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 [this message]
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
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=6ac46aa32eee969d9d8bc55be035247e3fdc0ac8.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=hch@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®