dm zoned: add 'status' callback
authorHannes Reinecke <hare@suse.de>
Mon, 11 May 2020 08:24:16 +0000 (10:24 +0200)
committerMike Snitzer <snitzer@redhat.com>
Fri, 15 May 2020 14:29:36 +0000 (10:29 -0400)
commitbc3d5717d242a37d2e9ea85d7e7b2e3569324d24
tree8f03f96efab1336662a15ab9a777543b6f46c8cb
parent2613eab11996c8d1439c2a44fbca52807be7faa6
dm zoned: add 'status' callback

Add callback to supply information for 'dmsetup status'
and 'dmsetup table'. The output for 'dmsetup status' is

0 <size> zoned <nr_zones> zones <nr_unmap_rnd>/<nr_rnd> random <nr_unmap_seq>/<nr_seq> sequential

where <nr_unmap_rnd> is the number of unmapped (ie free) random zones,
<nr_rnd> the total number of random zones, <nr_unmap_seq> the number
of unmapped sequential zones, and <nr_seq> the total number of
sequential zones.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Bob Liu <bob.liu@oracle.com>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Documentation/admin-guide/device-mapper/dm-zoned.rst
drivers/md/dm-zoned-metadata.c
drivers/md/dm-zoned-target.c
drivers/md/dm-zoned.h