[dm-devel] [PATCH v3 04/11] block: Introduce blkdev_nr_zones() helper
Hannes Reinecke
hare at suse.de
Fri Oct 12 07:36:11 UTC 2018
On 10/12/18 4:30 AM, Damien Le Moal wrote:
> Introduce the blkdev_nr_zones() helper function to get the total
> number of zones of a zoned block device. This number is always 0 for a
> regular block device (q->limits.zoned == BLK_ZONED_NONE case).
>
> Replace hard-coded number of zones calculation in dmz_get_zoned_device()
> with a call to this helper.
>
> Signed-off-by: Damien Le Moal <damien.lemoal at wdc.com>
> Reviewed-by: Christoph Hellwig <hch at lst.de>
> ---
> block/blk-zoned.c | 27 +++++++++++++++++++++++++++
> drivers/md/dm-zoned-target.c | 3 +--
> include/linux/blkdev.h | 5 +++++
> 3 files changed, 33 insertions(+), 2 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare at suse.com>
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare at suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
More information about the dm-devel
mailing list