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 <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
---
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 <[email protected]>
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
[email protected] +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)
--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel