]> www.infradead.org Git - users/hch/block.git/commitdiff
dm-zoned: don't set the discard_alignment queue limit
authorChristoph Hellwig <hch@lst.de>
Fri, 8 Apr 2022 09:26:57 +0000 (11:26 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 15 Apr 2022 06:50:02 +0000 (08:50 +0200)
The discard_alignment queue limit is named a bit misleading means the
offset into the block device at which the discard granularity starts.
Setting it to the discard granularity as done by dm-zoned is mostly
harmless but also useless.

Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/md/dm-zoned-target.c

index cac295cc8840efe5d78d60438f3276359c3b2c1d..0ec5d8b9b1a4e8040ddf93ecad27d377cc680dc6 100644 (file)
@@ -1001,7 +1001,7 @@ static void dmz_io_hints(struct dm_target *ti, struct queue_limits *limits)
        blk_limits_io_min(limits, DMZ_BLOCK_SIZE);
        blk_limits_io_opt(limits, DMZ_BLOCK_SIZE);
 
-       limits->discard_alignment = DMZ_BLOCK_SIZE;
+       limits->discard_alignment = 0;
        limits->discard_granularity = DMZ_BLOCK_SIZE;
        limits->max_discard_sectors = chunk_sectors;
        limits->max_hw_discard_sectors = chunk_sectors;