Sagi Grimberg <[email protected]> 于2025年12月1日周一 07:03写道: > > Acked-by: Sagi Grimberg <[email protected]>
Hello, I already dropped this patch in v3: https://lore.kernel.org/all/[email protected]/ The reason is that the order of operations is critical. In the original code:: ---------------- ... bio->bi_end_io = nvmet_bio_done; for_each_sg(req->sg, sg, req->sg_cnt, i) { ... struct bio *prev = bio; .... bio_chain(bio, prev); submit_bio(prev); } ---------------- the oldest bio (i.e., prev) retains the real bi_end_io function: bio -> bio -> ... -> prev However, using bio_chain_and_submit(prev, bio) would create the reverse chain: prev -> prev -> ... -> bio where the newest bio would hold the real bi_end_io function, which does not match the required behavior in this context. Thanks, Shida
