On Mon, Oct 07, 2024 at 03:39:42PM -0700, Bart Van Assche wrote: > For my patch series that supports pipelining for zoned writes, I need > the submission order to be preserved. Jens mentioned two possible > solutions: > - Either keep the approach that requests on plug->mq_list are in reverse > order and reverse the request order just before submitting requests. > - Or change plug->mq_list into a doubly linked list. > > The second approach seems the most interesting to me. I'm concerned that > with the first approach it will be difficult to preserve the request > order if a subset of the requests on plug->mq_list are submitted, e.g. > because a queue full condition is encountered by > blk_mq_dispatch_plug_list(). Note that you don't really need a full doubly linked, you just need a tail pointer in the plug, i.g. the same scheme as struct bio_list.