On 8/27/26 05:49, Keith Busch wrote:
> On Thu, Aug 27, 2026 at 02:01:12AM +0200, Md Haris Iqbal wrote:
>> Two things are worth a look. A delayed bio is resubmitted below the
>> injection hook, so the rules are not applied to it again and it can never
>> pick up a status from another rule. And holding a bio back reorders it
>> against bios submitted later, which breaks sequential write ordering on
>> zoned devices. Both are documented in patch 3.
>
> Would it be possible to do the delay on the completion side instead?
> That should avoid those submission order problems.
Seems not. At bio_endio, bi_size is 0 hence the comparison rule cannot
be calculated. What can be done is to capture the decision to delay or
not at submit, and then execute it at completion, but something (the
same kmalloc_obj?) needs to carry this all the way.
Besides, the bio would have been written to the device already, meaning
if the rule said to delay and then fail, the upper layer will see the
failure, but the data would have landed in the disk. Maybe not the worst
idea, but still semantically incorrect since the documentation claims
that nothing is seen by the device.
One way would be to omit delay injection for all bios meant for zoned
block devices.