diff mbox series

[4/9] ubd: use the default discard granularity

Message ID 20231228075545.362768-5-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [1/9] block: remove two comments in bio_split_discard | expand

Commit Message

Christoph Hellwig Dec. 28, 2023, 7:55 a.m. UTC
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(-)

Comments

Richard Weinberger Dec. 28, 2023, 11:10 a.m. UTC | #1
----- Ursprüngliche Mail -----
> Von: "hch" <hch@lst.de>
> An: "Jens Axboe" <axboe@kernel.dk>
> CC: "richard" <richard@nod.at>, "anton ivanov" <anton.ivanov@cambridgegreys.com>, "Josef Bacik" <josef@toxicpanda.com>,
> "Minchan Kim" <minchan@kernel.org>, "senozhatsky" <senozhatsky@chromium.org>, "Coly Li" <colyli@suse.de>, "Miquel
> Raynal" <miquel.raynal@bootlin.com>, "Vignesh Raghavendra" <vigneshr@ti.com>, "linux-um"
> <linux-um@lists.infradead.org>, "linux-block" <linux-block@vger.kernel.org>, nbd@other.debian.org, "linux-bcache"
> <linux-bcache@vger.kernel.org>, "linux-mtd" <linux-mtd@lists.infradead.org>
> Gesendet: Donnerstag, 28. Dezember 2023 08:55:40
> Betreff: [PATCH 4/9] 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>
> ---
> 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);
> 	}

Acked-by: Richard Weinberger <richard@nod.at>

Thanks,
//richard
diff mbox series

Patch

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);
 	}