Commit 31e4fac9 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

mtd_blkdevs: use the default discard granularity

The discard granularity now defaults to a single sector, so don't set
that value explicitly.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarRichard Weinberger <richard@nod.at>
Link: https://lore.kernel.org/r/20231228075545.362768-10-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 105c1a5f
......@@ -376,10 +376,8 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
blk_queue_flag_set(QUEUE_FLAG_NONROT, new->rq);
blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, new->rq);
if (tr->discard) {
if (tr->discard)
blk_queue_max_discard_sectors(new->rq, UINT_MAX);
new->rq->limits.discard_granularity = tr->blksize;
}
gd->queue = new->rq;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment