mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 14:24:11 +08:00
ubd: use the default discard granularity
The discard granularity now defaults to a single sector, so don't set that value explicitly. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Richard Weinberger <richard@nod.at> Link: https://lore.kernel.org/r/20231228075545.362768-5-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
3c407dc723
commit
599d9d4eab
@ -798,7 +798,6 @@ static int ubd_open_dev(struct ubd *ubd_dev)
|
|||||||
ubd_dev->cow.fd = err;
|
ubd_dev->cow.fd = err;
|
||||||
}
|
}
|
||||||
if (ubd_dev->no_trim == 0) {
|
if (ubd_dev->no_trim == 0) {
|
||||||
ubd_dev->queue->limits.discard_granularity = SECTOR_SIZE;
|
|
||||||
blk_queue_max_discard_sectors(ubd_dev->queue, UBD_MAX_REQUEST);
|
blk_queue_max_discard_sectors(ubd_dev->queue, UBD_MAX_REQUEST);
|
||||||
blk_queue_max_write_zeroes_sectors(ubd_dev->queue, UBD_MAX_REQUEST);
|
blk_queue_max_write_zeroes_sectors(ubd_dev->queue, UBD_MAX_REQUEST);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user