]> www.infradead.org Git - users/jedix/linux-maple.git/commit
block: introduce zone capacity helper
authorNaohiro Aota <naohiro.aota@wdc.com>
Wed, 19 Mar 2025 01:49:16 +0000 (10:49 +0900)
committerDavid Sterba <dsterba@suse.com>
Thu, 17 Apr 2025 09:57:20 +0000 (11:57 +0200)
commitc1a79b1a583654f24b17da81ba868b0064077243
treed89dd9caa58fe94cbcf7a80b30b5d46488604c33
parentf1ab0171e9be96fd530329fa54761cff5e09ea95
block: introduce zone capacity helper

{bdev,disk}_zone_capacity() takes block_device or gendisk and sector position
and returns the zone capacity of the corresponding zone.

With that, move disk_nr_zones() and blk_zone_plug_bio() to consolidate them in
the same #ifdef block.

Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: David Sterba <dsterba@suse.com>
include/linux/blkdev.h