]> www.infradead.org Git - users/hch/block.git/commitdiff
null_blk: don't set the discard_alignment queue limit
authorChristoph Hellwig <hch@lst.de>
Fri, 8 Apr 2022 08:48:24 +0000 (10:48 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 15 Apr 2022 06:50:01 +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 null_blk is mostly
harmless but also useless.

Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/block/null_blk/main.c

index f6493a9e85ed393cf0d874e2a94b43d750c418c3..81b76749edd8f1241bb674d97aac8d381de5b5ab 100644 (file)
@@ -1765,7 +1765,6 @@ static void null_config_discard(struct nullb *nullb)
        }
 
        nullb->q->limits.discard_granularity = nullb->dev->blocksize;
-       nullb->q->limits.discard_alignment = nullb->dev->blocksize;
        blk_queue_max_discard_sectors(nullb->q, UINT_MAX >> 9);
 }