bdev/zone: add offline as a new zone action
bdev_zone.h already has support for offline in enum spdk_bdev_zone_state. Therefore, a user can call spdk_bdev_get_zone_info() and see that a zone is in state offline, but the user has no way of putting a zone in that state. Add SPDK_BDEV_ZONE_OFFLINE to enum spdk_bdev_zone_action, so that a user can call spdk_bdev_zone_management() to put a zone in zone state offline. Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Change-Id: I733a815949d7db0fdce293ba0d762e75a545ba76 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6909 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
ee4868de68
commit
a5b784fb2a
@ -53,7 +53,8 @@ enum spdk_bdev_zone_action {
|
||||
SPDK_BDEV_ZONE_CLOSE,
|
||||
SPDK_BDEV_ZONE_FINISH,
|
||||
SPDK_BDEV_ZONE_OPEN,
|
||||
SPDK_BDEV_ZONE_RESET
|
||||
SPDK_BDEV_ZONE_RESET,
|
||||
SPDK_BDEV_ZONE_OFFLINE,
|
||||
};
|
||||
|
||||
enum spdk_bdev_zone_state {
|
||||
@ -149,7 +150,7 @@ int spdk_bdev_get_zone_info(struct spdk_bdev_desc *desc, struct spdk_io_channel
|
||||
* \param desc Block device descriptor.
|
||||
* \param ch I/O channel. Obtained by calling spdk_bdev_get_io_channel().
|
||||
* \param zone_id First logical block of a zone.
|
||||
* \param action Action to perform on a zone (open, close, reset, finish).
|
||||
* \param action Action to perform on a zone (open, close, reset, finish, offline).
|
||||
* \param cb Called when the request is complete.
|
||||
* \param cb_arg Argument passed to cb.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user