Spdk/test/unit/lib/bdev
Niklas Cassel 0859db6b69 bdev/zone: add support for get num zones
There are three modules implementing the bdev-zone API:
bdev_nvme, bdev_ocssd, and vbdev_zone_block.

For all three modules, the number of zones can be calculated using:
block_count / zone_size.

To avoid this calculation being performed everywhere, create a helper
function in bdev_zone.h, together with the other zone APIs, such that
a user can easily get the number of zones.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I2967b15a604ab8bf4420588e7510b9820762f925
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7451
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-26 16:16:42 +00:00
..
bdev_zone.c bdev/zone: add support for get num zones 2021-04-26 16:16:42 +00:00
bdev.c lib/bdev: move to spdk_bdev_open_ext() 2021-03-05 08:33:45 +00:00
compress.c modules/crypto/compress: changes to support DPDK mbuf changes 2021-01-15 08:30:01 +00:00
crypto.c modules/crypto/compress: changes to support DPDK mbuf changes 2021-01-15 08:30:01 +00:00
gpt module/bdev_gpt: remove spdk prefix from static/internal functions. 2020-05-15 07:58:03 +00:00
mt test: add some missing stubs 2020-11-02 11:23:21 +00:00
nvme ut/bdev_nvme: Use attach/detach ctrlr for test_pending_reset() 2021-04-15 18:57:54 +00:00
part.c lib/bdev: move to spdk_bdev_part_base_construct_ext() 2021-03-09 08:54:53 +00:00
pmem remove unneeded spdk_internal/thread.h includes 2020-12-10 14:38:04 +00:00
raid test: Use PRId64 for portability 2020-11-19 09:53:05 +00:00
scsi_nvme.c ut: make use of CUnit macro to reduce duplications 2020-04-02 14:50:12 +00:00
vbdev_lvol.c bdev/lvol: Pass bdev name instead of bdev pointer to vbdev_lvs_create 2020-10-20 08:52:29 +00:00
vbdev_zone_block.c test: Use PRId64 for portability 2020-11-19 09:53:05 +00:00
Makefile ut/bdev_ocssd: Move bdev_ocssd_ut from bdev directory to bdev/nvme directory 2021-02-09 11:29:53 +00:00