lib/bdev: zoned info in get_bdevs RPC call
Zoned bdev properties were added to the result of the get_bdevs RPC call: - zoned: indicates whether the device is zoned or a regular block device - zone_size: number of blocks in a single zone - max_open_zones: maximum number of open zones - optimal_open_zones: optimal number of open zones The "zoned" field is a boolean and is always present, while the rest is only available for zoned bdevs. Change-Id: Ib82b39d4ab20543d0a754dbc4c0317885fb831d1 Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467144 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com> Reviewed-by: Maciej Szwed <maciej.szwed@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
724357e6c3
commit
c94ecfaedc
@ -7,6 +7,15 @@
|
|||||||
Added `spdk_bdev_get_write_unit_size()` function for retrieving required number
|
Added `spdk_bdev_get_write_unit_size()` function for retrieving required number
|
||||||
of logical blocks for write operation.
|
of logical blocks for write operation.
|
||||||
|
|
||||||
|
New zone-related fields were added to the result of the `get_bdevs` RPC call:
|
||||||
|
- `zoned`: indicates whether the device is zoned or a regular
|
||||||
|
block device
|
||||||
|
- `zone_size`: number of blocks in a single zone
|
||||||
|
- `max_open_zones`: maximum number of open zones
|
||||||
|
- `optimal_open_zones`: optimal number of open zones
|
||||||
|
The `zoned` field is a boolean and is always present, while the rest is only available for zoned
|
||||||
|
bdevs.
|
||||||
|
|
||||||
### nvmf
|
### nvmf
|
||||||
|
|
||||||
The `spdk_nvmf_tgt_create` function now accepts an object of type `spdk_nvmf_target_opts`
|
The `spdk_nvmf_tgt_create` function now accepts an object of type `spdk_nvmf_target_opts`
|
||||||
|
@ -611,6 +611,7 @@ Example response:
|
|||||||
"block_size": 512,
|
"block_size": 512,
|
||||||
"num_blocks": 20480,
|
"num_blocks": 20480,
|
||||||
"claimed": false,
|
"claimed": false,
|
||||||
|
"zoned": false,
|
||||||
"supported_io_types": {
|
"supported_io_types": {
|
||||||
"read": true,
|
"read": true,
|
||||||
"write": true,
|
"write": true,
|
||||||
|
@ -267,6 +267,13 @@ spdk_rpc_dump_bdev_info(struct spdk_json_write_ctx *w,
|
|||||||
|
|
||||||
spdk_json_write_named_bool(w, "claimed", (bdev->internal.claim_module != NULL));
|
spdk_json_write_named_bool(w, "claimed", (bdev->internal.claim_module != NULL));
|
||||||
|
|
||||||
|
spdk_json_write_named_bool(w, "zoned", bdev->zoned);
|
||||||
|
if (bdev->zoned) {
|
||||||
|
spdk_json_write_named_uint64(w, "zone_size", bdev->zone_size);
|
||||||
|
spdk_json_write_named_uint64(w, "max_open_zones", bdev->max_open_zones);
|
||||||
|
spdk_json_write_named_uint64(w, "optimal_open_zones", bdev->optimal_open_zones);
|
||||||
|
}
|
||||||
|
|
||||||
spdk_json_write_named_object_begin(w, "supported_io_types");
|
spdk_json_write_named_object_begin(w, "supported_io_types");
|
||||||
spdk_json_write_named_bool(w, "read",
|
spdk_json_write_named_bool(w, "read",
|
||||||
spdk_bdev_io_type_supported(bdev, SPDK_BDEV_IO_TYPE_READ));
|
spdk_bdev_io_type_supported(bdev, SPDK_BDEV_IO_TYPE_READ));
|
||||||
|
@ -27,5 +27,6 @@
|
|||||||
"write": $(S),
|
"write": $(S),
|
||||||
"write_zeroes": $(S)
|
"write_zeroes": $(S)
|
||||||
},
|
},
|
||||||
"uuid": "$(S)"
|
"uuid": "$(S)",
|
||||||
|
"zoned": false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user