Re: [PATCH] block: Submit flush requests to the I/O scheduler

Damien Le Moal
2022-08-14T17:13:24Z

On 2022/08/12 23:41, Christoph Hellwig wrote:
> On Fri, Aug 12, 2022 at 02:03:55PM -0700, Bart Van Assche wrote:
>> When submitting a REQ_OP_WRITE | REQ_FUA request to a zoned storage
>> device, these requests must be passed to the (mq-deadline) I/O scheduler
>> to ensure that these happen at the write pointer.
>
> Yes.
>
> But maybe I'm stupid, but how is the patch related to fixing that?
> blk_mq_plug_issue_direct is called from blk_mq_flush_plug_list for
> only the !has_elevator case. How does that change a thing?

And writes to zoned drives never get plugged in the first place, scheduler
present or not.

>
> Also please include a description of why these changes are otherwise
> good and won't regress other cases.
>
>> + blk_mq_sched_insert_request(rq, /*at_head=*/false,
>> + /*run_queue=*/last, /*async=*/false);
>
> I find thise comment style very hard to read. Yes, maybe the three
> bools here should become flags, but this is even worse than just
> passing the arguments.

--
Damien Le Moal
Western Digital Research