[PATCH 4/9] ubd: use the default discard granularity
- To: Jens Axboe <axboe@kernel.dk>
- Cc: Richard Weinberger <richard@nod.at>, Anton Ivanov <anton.ivanov@cambridgegreys.com>, Josef Bacik <josef@toxicpanda.com>, Minchan Kim <minchan@kernel.org>, Sergey Senozhatsky <senozhatsky@chromium.org>, Coly Li <colyli@suse.de>, Miquel Raynal <miquel.raynal@bootlin.com>, Vignesh Raghavendra <vigneshr@ti.com>, linux-um@lists.infradead.org, linux-block@vger.kernel.org, nbd@other.debian.org, linux-bcache@vger.kernel.org, linux-mtd@lists.infradead.org
- Subject: [PATCH 4/9] ubd: use the default discard granularity
- From: Christoph Hellwig <hch@lst.de>
- Date: Thu, 28 Dec 2023 07:55:40 +0000
- Message-id: <[🔎] 20231228075545.362768-5-hch@lst.de>
- In-reply-to: <[🔎] 20231228075545.362768-1-hch@lst.de>
- References: <[🔎] 20231228075545.362768-1-hch@lst.de>
The discard granularity now defaults to a single sector, so don't set
that value explicitly.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
arch/um/drivers/ubd_kern.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 50206feac577d5..92ee2697ff3984 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -798,7 +798,6 @@ static int ubd_open_dev(struct ubd *ubd_dev)
ubd_dev->cow.fd = err;
}
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_write_zeroes_sectors(ubd_dev->queue, UBD_MAX_REQUEST);
}
--
2.39.2
Reply to: