diff options
author | Christoph Hellwig <hch@lst.de> | 2022-04-15 06:52:54 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-04-18 03:49:59 +0200 |
commit | cf0fbf894bb543f472f682c486be48298eccf199 (patch) | |
tree | 94e16623288183a37b3448976a706a3e9e5aec74 /arch/um/drivers/ubd_kern.c | |
parent | block: refactor discard bio size limiting (diff) | |
download | linux-cf0fbf894bb543f472f682c486be48298eccf199.tar.xz linux-cf0fbf894bb543f472f682c486be48298eccf199.zip |
block: add a bdev_max_discard_sectors helper
Add a helper to query the number of sectors support per each discard bio
based on the block device and use this helper to stop various places from
poking into the request_queue to see if discard is supported and if so how
much. This mirrors what is done e.g. for write zeroes as well.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com> [drbd]
Acked-by: Coly Li <colyli@suse.de> [bcache]
Acked-by: David Sterba <dsterba@suse.com> [btrfs]
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20220415045258.199825-24-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'arch/um/drivers/ubd_kern.c')
0 files changed, 0 insertions, 0 deletions