Hi,
在 2025/08/25 17:17, Christoph Hellwig 写道:
On Thu, Aug 21, 2025 at 05:37:15PM +0800, Yu Kuai wrote:
Fix bio splitting by the crypto fallback code
Yes.
I'll take look at all the callers of bio_chain(), in theory, we'll have
different use cases like:
1) chain old -> new, or chain new -> old
2) put old or new to current->bio_list, currently always in the tail,
we might want a new case to the head;
Perhaps it'll make sense to add high level helpers to do the chain
and resubmit and convert all callers to use new helpers, want do you
think?
I don't think chaining really is problem here, but more how bios
are split when already in the block layer. It's been a bit of a
source for problems, so I think we'll need to sort it out. Especially
as the handling of splits for the same device vs devices below the
current one seems a bit problematic in general.
I just send a new rfc verion to unify block layer and mdraid to use
the same helper bio_submit_split(), and convert only that helper to
insert split bio to the head of current->bio_list(). And probably
blk-crypto-fallback can use this new helper as well.
Can you take a look? This is the proper solution that I can think of
for now.
Thanks,
Kuai
.