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.

block: Drop granularity check in queue_limit_discard_alignment()

lim->discard_granularity is always at least SECTOR_SIZE, so drop the
pointless check for granularity less than SECTOR_SIZE.

Signed-off-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20241112092144.4059847-1-john.g.garry@oracle.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

John Garry and committed by
Jens Axboe
e924da7d b4912557

-2
-2
block/blk-settings.c
··· 465 465 /* Why are these in bytes, not sectors? */ 466 466 alignment = lim->discard_alignment >> SECTOR_SHIFT; 467 467 granularity = lim->discard_granularity >> SECTOR_SHIFT; 468 - if (!granularity) 469 - return 0; 470 468 471 469 /* Offset of the partition start in 'granularity' sectors */ 472 470 offset = sector_div(sector, granularity);