Re: [PATCH] block: check queue's limits.discard_granularity in __blkdev_issue_discard()

2020-08-04 Thread Coly Li
On 2020/8/5 10:50, Coly Li wrote: > If create a loop device with a backing NVMe SSD, current loop device > driver doesn't correctly set its queue's limits.discard_granularity and > leaves it as 0. If a discard request at LBA 0 on this loop device, in > __blkdev_issue_discard() the calculated

[PATCH] block: check queue's limits.discard_granularity in __blkdev_issue_discard()

2020-08-04 Thread Coly Li
If create a loop device with a backing NVMe SSD, current loop device driver doesn't correctly set its queue's limits.discard_granularity and leaves it as 0. If a discard request at LBA 0 on this loop device, in __blkdev_issue_discard() the calculated req_sects will be 0, and a zero length discard