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

Richard Weinberger richard at nod.at
Thu Dec 28 03:10:11 PST 2023


----- Ursprüngliche Mail -----
> Von: "hch" <hch at lst.de>
> An: "Jens Axboe" <axboe at kernel.dk>
> CC: "richard" <richard at nod.at>, "anton ivanov" <anton.ivanov at cambridgegreys.com>, "Josef Bacik" <josef at toxicpanda.com>,
> "Minchan Kim" <minchan at kernel.org>, "senozhatsky" <senozhatsky at chromium.org>, "Coly Li" <colyli at suse.de>, "Miquel
> Raynal" <miquel.raynal at bootlin.com>, "Vignesh Raghavendra" <vigneshr at ti.com>, "linux-um"
> <linux-um at lists.infradead.org>, "linux-block" <linux-block at vger.kernel.org>, nbd at other.debian.org, "linux-bcache"
> <linux-bcache at vger.kernel.org>, "linux-mtd" <linux-mtd at 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 at 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 at nod.at>

Thanks,
//richard



More information about the linux-mtd mailing list