From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Christian Brauner <brauner@kernel.org>,
linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 3/3] iomap: use bio_complete_in_task for buffered simple dio read failures
Date: Mon, 28 Sep 2026 17:30:29 -0700 [thread overview]
Message-ID: <20260929003029.GQ6283@frogsfrogsfrogs> (raw)
In-Reply-To: <20260928091111.3986811-4-hch@lst.de>
On Mon, Sep 28, 2026 at 11:11:09AM +0200, Christoph Hellwig wrote:
> Use bio_complete_in_task to defer the bio completion handler to task
> context instead of the homegrown deferral.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Nice conversion here too.
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
--D
> ---
> fs/iomap/direct-io.c | 19 +------------------
> 1 file changed, 1 insertion(+), 18 deletions(-)
>
> diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
> index 8b4039d16ce8..8ee8db6bb794 100644
> --- a/fs/iomap/direct-io.c
> +++ b/fs/iomap/direct-io.c
> @@ -919,7 +919,6 @@ struct iomap_dio_simple {
> struct kiocb *iocb;
> size_t size;
> unsigned int dio_flags;
> - struct work_struct work;
> /*
> * Align @bio to a cacheline boundary so that, combined with the
> * front_pad passed to bioset_init(), the bio sits at the start of
> @@ -961,30 +960,14 @@ static ssize_t iomap_dio_simple_complete(struct iomap_dio_simple *sr)
> return ret;
> }
>
> -static void iomap_dio_simple_complete_work(struct work_struct *work)
> -{
> - struct iomap_dio_simple *sr =
> - container_of(work, struct iomap_dio_simple, work);
> - struct kiocb *iocb = sr->iocb;
> -
> - WRITE_ONCE(iocb->private, NULL);
> - iocb->ki_complete(iocb, iomap_dio_simple_complete(sr));
> -}
> -
> static void iomap_dio_simple_end_io(struct bio *bio)
> {
> struct iomap_dio_simple *sr =
> container_of(bio, struct iomap_dio_simple, bio);
> struct kiocb *iocb = sr->iocb;
>
> - if (unlikely(sr->bio.bi_status)) {
> - struct inode *inode = file_inode(iocb->ki_filp);
> -
> - INIT_WORK(&sr->work, iomap_dio_simple_complete_work);
> - queue_work(inode->i_sb->s_dio_done_wq, &sr->work);
> + if (unlikely(bio->bi_status) && bio_complete_in_task(bio))
> return;
> - }
> -
> WRITE_ONCE(iocb->private, NULL);
> iocb->ki_complete(iocb, iomap_dio_simple_complete(sr));
> }
> --
> 2.53.0
>
next prev parent reply other threads:[~2026-09-29 0:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 9:11 use bio_complete_in_task for iomap error reporting Christoph Hellwig
2026-09-28 9:11 ` [PATCH 1/3] iomap: use bio_complete_in_task for buffered read failures Christoph Hellwig
2026-09-29 0:23 ` Darrick J. Wong
2026-09-29 15:23 ` Andrey Albershteyn
2026-09-28 9:11 ` [PATCH 2/3] iomap: use bio_complete_in_task for buffered write failures Christoph Hellwig
2026-09-29 0:29 ` Darrick J. Wong
2026-09-29 15:24 ` Andrey Albershteyn
2026-09-28 9:11 ` [PATCH 3/3] iomap: use bio_complete_in_task for buffered simple dio read failures Christoph Hellwig
2026-09-29 0:30 ` Darrick J. Wong [this message]
2026-09-29 15:24 ` Andrey Albershteyn
2026-10-12 9:28 ` use bio_complete_in_task for iomap error reporting Christian Brauner
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=20260929003029.GQ6283@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=brauner@kernel.org \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.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 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.