[dm-devel] [PATCH] block: fix infinite loop if the device loses discard capability

Jens Axboe axboe at kernel.dk
Fri Jul 6 13:50:56 UTC 2018


On 7/3/18 11:34 AM, Mikulas Patocka wrote:
> If __blkdev_issue_discard is in progress and a device mapper device is
> reloaded with a table that doesn't support discard,
> q->limits.max_discard_sectors is set to zero. This results in infinite
> loop in __blkdev_issue_discard.
> 
> This patch checks if max_discard_sectors is zero and aborts with
> -EOPNOTSUPP.

Applied, thanks.

-- 
Jens Axboe




More information about the dm-devel mailing list