bdev_iscsi: add bdev iscsi config json
save bdev iscsi opts config Signed-off-by: gongwei <gongwei833x@gmail.com> Change-Id: I9601098b426b8c080ae374f2fa1c23eec14f140b Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14898 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
f658f463a4
commit
6f445382a8
@ -188,10 +188,32 @@ bdev_iscsi_finish(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
bdev_iscsi_opts_config_json(struct spdk_json_write_ctx *w)
|
||||||
|
{
|
||||||
|
spdk_json_write_object_begin(w);
|
||||||
|
|
||||||
|
spdk_json_write_named_string(w, "method", "bdev_iscsi_set_options");
|
||||||
|
|
||||||
|
spdk_json_write_named_object_begin(w, "params");
|
||||||
|
spdk_json_write_named_uint64(w, "timeout_sec", g_opts.timeout_sec);
|
||||||
|
spdk_json_write_object_end(w);
|
||||||
|
|
||||||
|
spdk_json_write_object_end(w);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
bdev_iscsi_config_json(struct spdk_json_write_ctx *w)
|
||||||
|
{
|
||||||
|
bdev_iscsi_opts_config_json(w);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static struct spdk_bdev_module g_iscsi_bdev_module = {
|
static struct spdk_bdev_module g_iscsi_bdev_module = {
|
||||||
.name = "iscsi",
|
.name = "iscsi",
|
||||||
.module_init = bdev_iscsi_initialize,
|
.module_init = bdev_iscsi_initialize,
|
||||||
.module_fini = bdev_iscsi_finish,
|
.module_fini = bdev_iscsi_finish,
|
||||||
|
.config_json = bdev_iscsi_config_json,
|
||||||
.get_ctx_size = bdev_iscsi_get_ctx_size,
|
.get_ctx_size = bdev_iscsi_get_ctx_size,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ def filter_methods(do_remove_global_rpcs):
|
|||||||
'nvmf_set_crdt',
|
'nvmf_set_crdt',
|
||||||
'bdev_set_options',
|
'bdev_set_options',
|
||||||
'bdev_wait_for_examine',
|
'bdev_wait_for_examine',
|
||||||
|
'bdev_iscsi_set_options',
|
||||||
'bdev_nvme_set_options',
|
'bdev_nvme_set_options',
|
||||||
'bdev_nvme_set_hotplug',
|
'bdev_nvme_set_hotplug',
|
||||||
'sock_impl_set_options',
|
'sock_impl_set_options',
|
||||||
|
Loading…
Reference in New Issue
Block a user