summaryrefslogtreecommitdiff
path: root/block/blk-zoned.c
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@wdc.com>2018-10-12 13:08:48 +0300
committerJens Axboe <axboe@kernel.dk>2018-10-25 20:17:40 +0300
commit965b652e901886ea54f93c60027b5be76328d958 (patch)
tree3fc654b827875179138aeeeadd68fd1ebb287771 /block/blk-zoned.c
parenta2d6b3a2d39005ab4d4a83481a7db092ebf0e9d6 (diff)
downloadlinux-965b652e901886ea54f93c60027b5be76328d958.tar.xz
block: Expose queue nr_zones in sysfs
Expose through sysfs the nr_zones field of struct request_queue. Exposing this value helps in debugging disk issues as well as facilitating scripts based use of the disk (e.g. blktests). For zoned block devices, the nr_zones field indicates the total number of zones of the device calculated using the known disk capacity and zone size. This number of zones is always 0 for regular block devices. Since nr_zones is defined conditionally with CONFIG_BLK_DEV_ZONED, introduce the blk_queue_nr_zones() function to return the correct value for any device, regardless if CONFIG_BLK_DEV_ZONED is set. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-zoned.c')
0 files changed, 0 insertions, 0 deletions