public inbox for linux-doc@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Joanne Koong <joannelkoong@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>,
	Christoph Hellwig <hch@infradead.org>,
	brauner@kernel.org, miklos@szeredi.hu,
	linux-fsdevel@vger.kernel.org, kernel-team@meta.com,
	linux-xfs@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v1 05/16] iomap: propagate iomap_read_folio() error to caller
Date: Tue, 23 Sep 2025 11:34:17 -0700	[thread overview]
Message-ID: <20250923183417.GE1587915@frogsfrogsfrogs> (raw)
In-Reply-To: <CAJnrk1ZxQt0RmYnoi3bcDCLn1=Zgk9uJEcFNMH59ZXV7T6c2Fg@mail.gmail.com>

On Mon, Sep 22, 2025 at 09:49:50AM -0700, Joanne Koong wrote:
> On Thu, Sep 4, 2025 at 2:13 PM Matthew Wilcox <willy@infradead.org> wrote:
> >
> > On Wed, Sep 03, 2025 at 11:09:32PM -0700, Christoph Hellwig wrote:
> > > On Fri, Aug 29, 2025 at 04:56:16PM -0700, Joanne Koong wrote:
> > > > Propagate any error encountered in iomap_read_folio() back up to its
> > > > caller (otherwise a default -EIO will be passed up by
> > > > filemap_read_folio() to callers). This is standard behavior for how
> > > > other filesystems handle their ->read_folio() errors as well.
> > >
> > > Is it?  As far as I remember we, or willy in particular has been
> > > trying to kill this error return - it isn't very hepful when the
> > > actually interesting real errors only happen on async completion
> > > anyway.
> >
> > I killed the error return from ->readahead (formerly readpages).
> > By definition, nobody is interested in the error of readahead
> > since nobody asked for the data in those pages.
> >
> > I designed an error reporting mechanism a while back that allowed the
> > errno to propagate from completion context to whoever was waiting
> > on the folio(s) that were part of a read request.  I can dig that
> > patchset up again if there's interest.
> 
> Could you describe a bit how your design works?

I'm not really sure how you'd propagate specific errnos to callers, so
I'm also curious to hear about this.  The least inefficient (and most
gross) way I can think of would be to save read(ahead) errnos in the
mapping or the folio (or maybe the ifs) and have the callers access
that?

I wrote a somewhat similar thing as part of the autonomous self healing
XFS project:
https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/commit/?h=health-monitoring&id=32cade9599ad951720804379381abb68575356b6

Obviously the events bubble up to a daemon, not necessarily the caller
who's waiting on the folio.

--D

> Thanks,
> Joanne
> >
> 

  reply	other threads:[~2025-09-23 18:34 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-29 23:56 [PATCH v1 00/16] fuse: use iomap for buffered reads + readahead Joanne Koong
2025-08-29 23:56 ` [PATCH v1 01/16] iomap: move async bio read logic into helper function Joanne Koong
2025-09-03 20:16   ` Darrick J. Wong
2025-09-04  6:00     ` Christoph Hellwig
2025-09-04 21:44       ` Joanne Koong
2025-08-29 23:56 ` [PATCH v1 02/16] iomap: rename cur_folio_in_bio to folio_unlocked Joanne Koong
2025-09-03 20:26   ` [PATCH v1 02/16] iomap: rename cur_folio_in_bio to folio_unlockedOM Darrick J. Wong
2025-09-04  6:03     ` Christoph Hellwig
2025-09-04 22:06       ` Joanne Koong
2025-09-05 15:03         ` Darrick J. Wong
2025-08-29 23:56 ` [PATCH v1 03/16] iomap: refactor read/readahead completion Joanne Koong
2025-09-04  6:05   ` Christoph Hellwig
2025-09-04 23:16     ` Joanne Koong
2025-08-29 23:56 ` [PATCH v1 04/16] iomap: use iomap_iter->private for stashing read/readahead bio Joanne Koong
2025-09-03 20:30   ` Darrick J. Wong
2025-09-04  6:07     ` Christoph Hellwig
2025-09-04 22:20       ` Joanne Koong
2025-09-04 23:15         ` Joanne Koong
2025-08-29 23:56 ` [PATCH v1 05/16] iomap: propagate iomap_read_folio() error to caller Joanne Koong
2025-09-03 20:32   ` Darrick J. Wong
2025-09-04  6:09   ` Christoph Hellwig
2025-09-04 21:13     ` Matthew Wilcox
2025-09-22 16:49       ` Joanne Koong
2025-09-23 18:34         ` Darrick J. Wong [this message]
2025-09-24 23:12           ` Joanne Koong
2025-08-29 23:56 ` [PATCH v1 06/16] iomap: move read/readahead logic out of CONFIG_BLOCK guard Joanne Koong
2025-08-29 23:56 ` [PATCH v1 07/16] iomap: iterate through entire folio in iomap_readpage_iter() Joanne Koong
2025-09-03 20:43   ` Darrick J. Wong
2025-09-04 22:37     ` Joanne Koong
2025-09-04  6:14   ` Christoph Hellwig
2025-09-04 22:45     ` Joanne Koong
2025-08-29 23:56 ` [PATCH v1 08/16] iomap: rename iomap_readpage_iter() to iomap_readfolio_iter() Joanne Koong
2025-09-04  6:15   ` Christoph Hellwig
2025-09-04 22:47     ` Joanne Koong
2025-08-29 23:56 ` [PATCH v1 09/16] iomap: rename iomap_readpage_ctx struct to iomap_readfolio_ctx Joanne Koong
2025-09-03 20:44   ` Darrick J. Wong
2025-08-29 23:56 ` [PATCH v1 10/16] iomap: add iomap_start_folio_read() helper Joanne Koong
2025-09-03 20:52   ` Darrick J. Wong
2025-08-29 23:56 ` [PATCH v1 11/16] iomap: make start folio read and finish folio read public APIs Joanne Koong
2025-09-03 20:53   ` Darrick J. Wong
2025-09-04  6:15   ` Christoph Hellwig
2025-08-29 23:56 ` [PATCH v1 12/16] iomap: add iomap_read_ops for read and readahead Joanne Koong
2025-09-03 21:08   ` Darrick J. Wong
2025-09-04 20:58     ` Joanne Koong
2025-09-04  6:21   ` Christoph Hellwig
2025-09-04 21:38     ` Joanne Koong
2025-08-29 23:56 ` [PATCH v1 13/16] iomap: add a private arg " Joanne Koong
2025-08-30  1:54   ` Gao Xiang
2025-09-02 21:24     ` Joanne Koong
2025-09-03  1:55       ` Gao Xiang
2025-09-04 23:29         ` Joanne Koong
2025-09-05  2:21           ` Gao Xiang
2025-09-05 15:21             ` Darrick J. Wong
2025-09-08  6:56               ` Gao Xiang
2025-09-03 21:11   ` Darrick J. Wong
2025-08-29 23:56 ` [PATCH v1 14/16] fuse: use iomap for read_folio Joanne Koong
2025-09-03 21:13   ` Darrick J. Wong
2025-08-29 23:56 ` [PATCH v1 15/16] fuse: use iomap for readahead Joanne Koong
2025-09-03 21:17   ` Darrick J. Wong
2025-09-04 19:40     ` Joanne Koong
2025-09-04 19:46   ` Joanne Koong
2025-08-29 23:56 ` [PATCH v1 16/16] fuse: remove fuse_readpages_end() null mapping check Joanne Koong
2025-09-02  9:21   ` Miklos Szeredi
2025-09-02 21:19     ` Joanne Koong

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=20250923183417.GE1587915@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=brauner@kernel.org \
    --cc=hch@infradead.org \
    --cc=joannelkoong@gmail.com \
    --cc=kernel-team@meta.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=willy@infradead.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