On 4/8/23 08:58, Bart Van Assche wrote: > Make sure that zoned writes are submitted in LBA order. > > Cc: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx> > Cc: Christoph Hellwig <hch@xxxxxx> > Cc: Ming Lei <ming.lei@xxxxxxxxxx> > Cc: Mike Snitzer <snitzer@xxxxxxxxxx> > Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> > --- > block/mq-deadline.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/block/mq-deadline.c b/block/mq-deadline.c > index 50a9d3b0a291..891ee0da73ac 100644 > --- a/block/mq-deadline.c > +++ b/block/mq-deadline.c > @@ -798,7 +798,7 @@ static void dd_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq, > > trace_block_rq_insert(rq); > > - if (at_head) { > + if (at_head && !blk_rq_is_seq_zoned_write(rq)) { > list_add(&rq->queuelist, &per_prio->dispatch); > rq->fifo_time = jiffies; > } else { Looks OK, but I would prefer us addressing the caller site using at_head = true, as that is almost always completely wrong for sequential zone writes. That would reduce the number of places we check for blk_rq_is_seq_zoned_write().