Message ID | 20231228075545.362768-10-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/9] block: remove two comments in bio_split_discard | expand |
----- 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:45 > Betreff: [PATCH 9/9] 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: Christoph Hellwig <hch@lst.de> > --- > drivers/mtd/mtd_blkdevs.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c > index ff18636e088973..0da7b33849471a 100644 > --- a/drivers/mtd/mtd_blkdevs.c > +++ b/drivers/mtd/mtd_blkdevs.c > @@ -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; > - } Acked-by: Richard Weinberger <richard@nod.at> Thanks, //richard
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c index ff18636e088973..0da7b33849471a 100644 --- a/drivers/mtd/mtd_blkdevs.c +++ b/drivers/mtd/mtd_blkdevs.c @@ -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;
The discard granularity now defaults to a single sector, so don't set that value explicitly. Signed-off-by: Christoph Hellwig <hch@lst.de> --- drivers/mtd/mtd_blkdevs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)