bdev/aio: add JSON config dump
Change-Id: I13b3313ef0d6983df4deb09553d49065ec2ad5e9 Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-on: https://review.gerrithub.io/401220 Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
010af134ec
commit
b745f41f27
@ -412,12 +412,33 @@ bdev_aio_dump_info_json(void *ctx, struct spdk_json_write_ctx *w)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
bdev_aio_write_json_config(struct spdk_bdev *bdev, struct spdk_json_write_ctx *w)
|
||||
{
|
||||
struct file_disk *fdisk = bdev->ctxt;
|
||||
|
||||
spdk_json_write_object_begin(w);
|
||||
|
||||
spdk_json_write_named_string(w, "method", "construct_aio_bdev");
|
||||
|
||||
spdk_json_write_named_object_begin(w, "params");
|
||||
spdk_json_write_named_string(w, "name", bdev->name);
|
||||
if (fdisk->block_size_override) {
|
||||
spdk_json_write_named_uint32(w, "block_size", bdev->blocklen);
|
||||
}
|
||||
spdk_json_write_named_string(w, "filename", fdisk->filename);
|
||||
spdk_json_write_object_end(w);
|
||||
|
||||
spdk_json_write_object_end(w);
|
||||
}
|
||||
|
||||
static const struct spdk_bdev_fn_table aio_fn_table = {
|
||||
.destruct = bdev_aio_destruct,
|
||||
.submit_request = bdev_aio_submit_request,
|
||||
.io_type_supported = bdev_aio_io_type_supported,
|
||||
.get_io_channel = bdev_aio_get_io_channel,
|
||||
.dump_info_json = bdev_aio_dump_info_json,
|
||||
.write_config_json = bdev_aio_write_json_config,
|
||||
};
|
||||
|
||||
static void aio_free_disk(struct file_disk *fdisk)
|
||||
|
Loading…
x
Reference in New Issue
Block a user