On Tue, Sep 10, 2024 at 05:48:43PM +0200, Christoph Hellwig wrote: > On Wed, Sep 04, 2024 at 08:26:04AM -0700, Keith Busch wrote: > > From: Keith Busch <kbusch@xxxxxxxxxx> > > > > If a bio is merged to a req, the entire bio list is merged, so don't > > temporarily unchain it when counting segments for consideration. > > As far as I can tell we never do merge decisions on bio lists. If > bi_next is non-NULL here it probably is due to scheduler lists or > something like it. I think bi_next is always NULL, so the unlinking should be a no-op. But just in case it isn't, the current unlinking will get the wrong segment count from the resulting merge.