]> www.infradead.org Git - users/hch/block.git/commitdiff
ubd: don't set the discard_alignment queue limit
authorChristoph Hellwig <hch@lst.de>
Fri, 8 Apr 2022 10:22:29 +0000 (12:22 +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 ubd is mostly harmless
but also useless.

Signed-off-by: Christoph Hellwig <hch@lst.de>
arch/um/drivers/ubd_kern.c

index 085ffdf98e57e492eaf67545d1a5efde58a1977d..c4344b67628dd677a4bd952d2aa8e783ccc56b39 100644 (file)
@@ -799,7 +799,6 @@ static int ubd_open_dev(struct ubd *ubd_dev)
        }
        if (ubd_dev->no_trim == 0) {
                ubd_dev->queue->limits.discard_granularity = SECTOR_SIZE;
-               ubd_dev->queue->limits.discard_alignment = 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);
        }