Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nbd: don't set the discard_alignment queue limit

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 nbd is mostly harmless
but also useless.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20220418045314.360785-3-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Christoph Hellwig and committed by
Jens Axboe
4a04d517 07c6e92a

-3
-3
drivers/block/nbd.c
··· 333 333 334 334 if (nbd->config->flags & NBD_FLAG_SEND_TRIM) { 335 335 nbd->disk->queue->limits.discard_granularity = blksize; 336 - nbd->disk->queue->limits.discard_alignment = blksize; 337 336 blk_queue_max_discard_sectors(nbd->disk->queue, UINT_MAX); 338 337 } 339 338 blk_queue_logical_block_size(nbd->disk->queue, blksize); ··· 1315 1316 1316 1317 nbd->tag_set.timeout = 0; 1317 1318 nbd->disk->queue->limits.discard_granularity = 0; 1318 - nbd->disk->queue->limits.discard_alignment = 0; 1319 1319 blk_queue_max_discard_sectors(nbd->disk->queue, 0); 1320 1320 1321 1321 mutex_unlock(&nbd->config_lock); ··· 1779 1781 blk_queue_flag_set(QUEUE_FLAG_NONROT, disk->queue); 1780 1782 blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, disk->queue); 1781 1783 disk->queue->limits.discard_granularity = 0; 1782 - disk->queue->limits.discard_alignment = 0; 1783 1784 blk_queue_max_discard_sectors(disk->queue, 0); 1784 1785 blk_queue_max_segment_size(disk->queue, UINT_MAX); 1785 1786 blk_queue_max_segments(disk->queue, USHRT_MAX);