Re: [PATCH] block/mq-deadline: Fix a bug in deadline_from_pos()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux