[PATCH v2 06/12] gfs2: Replace the repetitive bio chaining code patterns
Stephen Zhang
starzhangzsd at gmail.com
Sun Dec 7 02:03:53 PST 2025
Andreas Gruenbacher <agruenba at redhat.com> 于2025年12月5日周五 16:55写道:
>
> On Fri, Dec 5, 2025 at 8:46 AM Stephen Zhang <starzhangzsd at gmail.com> wrote:
> > Andreas Gruenbacher <agruenba at redhat.com> 于2025年12月4日周四 17:37写道:
> > >
> > > On Mon, Dec 1, 2025 at 11:31 AM Andreas Gruenbacher <agruenba at redhat.com> wrote:
> > > > On Sat, Nov 29, 2025 at 3:48 AM Stephen Zhang <starzhangzsd at gmail.com> wrote:
> > > > > This one should also be dropped because the 'prev' and 'new' are in
> > > > > the wrong order.
> > > >
> > > > Ouch. Thanks for pointing this out.
> > >
> > > Linus has merged the fix for this bug now, so this patch can be
> > > updated / re-added.
> > >
> >
> > Thank you for the update. I'm not clear on what specifically has been
> > merged or how to verify it.
> > Could you please clarify which fix was merged,
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8a157e0a0aa5
> "gfs2: Fix use of bio_chain"
>
>
Thank you for the detailed clarification. Here is a polite and
professional rephrasing of your message:
---
[WARNING]
Hello,
I may not have expressed myself clearly, and you might have
misunderstood my point.
In the original code, the real end I/O handler (`gfs2_end_log_read`)
was placed at the end of the chained bio list, while the newer
`bio_chain_endio` was placed earlier. With `bio_chain(new, prev)`,
the chain looked like:
`bio1 → bio2 → bio3`
`bio_chain_endio → bio_chain_endio → gfs2_end_log_read`
This ensured the actual handler (`gfs2_end_log_read`) was triggered
at the end of the chain.
However, after the fix changed the order to `bio_chain(prev, new)`,
the chain now looks like:
`bio1 → bio2 → bio3`
`gfs2_end_log_read → bio_chain_endio → bio_chain_endio`
This seems to place `gfs2_end_log_read` at the beginning rather
than the end, potentially preventing it from being executed as intended.
I hope I misunderstand the gfs2 code logic, and your fix may still be
correct. However, given how quickly the change was made and ported
back, I wanted to highlight this concern in case the original behavior
was intentional.
Thank you for your attention to this matter.
Best regards,
Shida
> > and if I should now resubmit the cleanup patches?
> >
> > Thanks,
> > Shida
> >
> > > Thanks,
> > > Andreas
> > >
> >
>
More information about the Linux-nvme
mailing list