On Jul 12, 2023 / 10:33, Bart Van Assche wrote: > A bug was introduced in deadline_from_pos() while implementing the > suggestion to use round_down() in the following code: > > pos -= bdev_offset_from_zone_start(rq->q->disk->part0, pos); > > This patch makes deadline_from_pos() use round_down() such that 'pos' is > rounded down. > > Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx> > Closes: https://lore.kernel.org/all/5zthzi3lppvcdp4nemum6qck4gpqbdhvgy4k3qwguhgzxc4quj@amulvgycq67h/ > Cc: Christoph Hellwig <hch@xxxxxx> > Cc: Damien Le Moal <dlemoal@xxxxxxxxxx> > Fixes: 0effb390c4ba ("block: mq-deadline: Handle requeued requests correctly") > Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> Thanks for the fix. I confirmed that it avoids the I/O error using a zoned null_blk device, a QEMU ZNS emulation device and a real ZNS drive. Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>