block: mq-deadline: Fix handling of at-head zoned writes
authorBart Van Assche <bvanassche@acm.org>
Wed, 17 May 2023 17:42:29 +0000 (10:42 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 19 May 2023 01:47:49 +0000 (19:47 -0600)
commita036e698c231ba884daa37196be3ac6c6dce1d75
tree26f4e605a8eade526c00c2709fd3aa91585c1ec8
parent0effb390c4bac1a484f0ca6ad3f1d183fcde882b
block: mq-deadline: Fix handling of at-head zoned writes

Before dispatching a zoned write from the FIFO list, check whether there
are any zoned writes in the RB-tree with a lower LBA for the same zone.
This patch ensures that zoned writes happen in order even if at_head is
set for some writes for a zone and not for others.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Cc: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20230517174230.897144-12-bvanassche@acm.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/mq-deadline.c