From: Christoph Hellwig <hch@infradead.org>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: Christoph Hellwig <hch@infradead.org>,
colyli@fnnas.com, axboe@kernel.dk, linux-block@vger.kernel.org,
linux-bcache@vger.kernel.org, Shida Zhang <zhangshida@kylinos.cn>
Subject: Re: [PATCH] Revert "bcache: fix improper use of bi_end_io"
Date: Tue, 13 Jan 2026 00:34:36 -0800 [thread overview]
Message-ID: <aWYDnKOdpT6gwL5b@infradead.org> (raw)
In-Reply-To: <aWYCe-MJKFaS__vi@moria.home.lan>
On Tue, Jan 13, 2026 at 03:30:41AM -0500, Kent Overstreet wrote:
> On Tue, Jan 13, 2026 at 12:07:54AM -0800, Christoph Hellwig wrote:
> > On Tue, Jan 13, 2026 at 02:09:39PM +0800, colyli@fnnas.com wrote:
> > > From: Coly Li <colyli@fnnas.com>
> > >
> > > This reverts commit 53280e398471f0bddbb17b798a63d41264651325.
> > >
> > > The above commit tries to address the race in bio chain handling,
> > > but it seems in detached_dev_end_io() simply using bio_endio() to
> > > replace bio->bi_end_io() may introduce potential regression.
> > >
> > > This patch revert the commit, let's wait for better fix from Shida.
> >
> > That's a pretty vague commit message for reverting a clear API
> > violation that has caused trouble. What is the story here?
>
> Christoph, you can't call bio_endio() on the same bio twice. You should
> know this. Calling a bare bi_end_io function is the correct thing to do
> when we're getting called from bio_endio().
Hi Kent,
indeed, calling bio_endio() twice is a very bad idea. Nothing in the
quoted commit log indicates that is the case, though. If that is
the problem it needs to be fixed, but calling ->bi_end_io directly
is not the proper fix either. That's eaxtly why I'm asking for the
story behind this.
next prev parent reply other threads:[~2026-01-13 8:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-13 6:09 [PATCH] Revert "bcache: fix improper use of bi_end_io" colyli
2026-01-13 8:07 ` Christoph Hellwig
2026-01-13 8:30 ` Kent Overstreet
2026-01-13 8:34 ` Christoph Hellwig [this message]
2026-01-13 8:39 ` Kent Overstreet
2026-01-13 8:58 ` Christoph Hellwig
2026-01-13 9:27 ` Kent Overstreet
2026-01-13 15:00 ` Christoph Hellwig
2026-01-13 15:30 ` Kent Overstreet
2026-01-13 16:18 ` Coly Li
2026-01-13 16:26 ` Christoph Hellwig
2026-01-13 16:34 ` Kent Overstreet
2026-01-19 9:51 ` Daniel Wagner
2026-01-19 10:18 ` Kent Overstreet
2026-01-19 10:34 ` Daniel Wagner
2026-01-19 15:57 ` Daniel Wagner
2026-01-13 16:22 ` Coly Li
2026-01-13 16:25 ` 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=aWYDnKOdpT6gwL5b@infradead.org \
--to=hch@infradead.org \
--cc=axboe@kernel.dk \
--cc=colyli@fnnas.com \
--cc=kent.overstreet@linux.dev \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=zhangshida@kylinos.cn \
/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.