numam-spdk/include
Niklas Cassel b7ad5b0b90 bdev/zone: add support for get zone id
In the bdev-zone API, there are a few functions that takes a zone_id:
spdk_bdev_get_zone_info(), spdk_bdev_zone_management(), and the
spdk_bdev_zone_append() functions.

The way a zoned application is usually written is that it starts off
by getting the zone report for all zones (zone_id will be sent in as 0),
and then the application will keep the whole zone report in memory.

Therefore, an application usually have access to the zone_id/zslba for
all zones. However, there are cases, e.g. when getting an error on write,
where the completion callback will only have the lba of the write that
failed.

Add a helper function that can be used to get the zone_id/slba for a
given lba. Having this helper in bdev-zone will avoid SPDK applications
needing to provide their own implementation for this.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I978335f87f7d49bc33aed81afcaa6d9f0af8a1e4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10180
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-11-11 23:23:35 +00:00
..
linux vhost: update virtion_config.h and virtio_ring.h 2019-12-20 10:04:27 +00:00
spdk bdev/zone: add support for get zone id 2021-11-11 23:23:35 +00:00
spdk_internal nvme/tcp: mark variable as potentially unused 2021-11-09 05:05:29 +00:00
Makefile build: Copy headers to build/include on build 2020-06-15 15:27:16 +00:00