bdev: rename 'dump_config_json' to 'dump_info_json'

Unfortunatly not all bdevs produce its configuration in responce to
get_bdevs RPC call (eg nvme is producing tons of additional
informations). To not breake any existing scripts rename
'dump_config_json' to 'dump_info_json' instead of reworking those
callbacks. Next patches will introduce real 'dump_config_json' handlers
and API

Change-Id: If9c1a4ab864791b24a5f7d022e970cd65990ffc0
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/401216
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Pawel Wodkowski 2018-02-22 13:48:13 +01:00 committed by Jim Harris
parent 1f94a99933
commit 2939b715d0
13 changed files with 26 additions and 26 deletions

View File

@ -239,7 +239,7 @@ bool spdk_bdev_io_type_supported(struct spdk_bdev *bdev, enum spdk_bdev_io_type
* \param w JSON write context. It will store the driver-specific configuration context.
* \return 0 on success, negated errno on failure.
*/
int spdk_bdev_dump_config_json(struct spdk_bdev *bdev, struct spdk_json_write_ctx *w);
int spdk_bdev_dump_info_json(struct spdk_bdev *bdev, struct spdk_json_write_ctx *w);
/**
* Get block device name.

View File

@ -152,13 +152,13 @@ struct spdk_bdev_fn_table {
struct spdk_io_channel *(*get_io_channel)(void *ctx);
/**
* Output driver-specific configuration to a JSON stream. Optional - may be NULL.
* Output driver-specific information to a JSON stream. Optional - may be NULL.
*
* The JSON write context will be initialized with an open object, so the bdev
* driver should write a name (based on the driver name) followed by a JSON value
* (most likely another nested object).
*/
int (*dump_config_json)(void *ctx, struct spdk_json_write_ctx *w);
int (*dump_info_json)(void *ctx, struct spdk_json_write_ctx *w);
/** Get spin-time per I/O channel in microseconds.
* Optional - may be NULL.

View File

@ -386,7 +386,7 @@ bdev_aio_get_io_channel(void *ctx)
static int
bdev_aio_dump_config_json(void *ctx, struct spdk_json_write_ctx *w)
bdev_aio_dump_info_json(void *ctx, struct spdk_json_write_ctx *w)
{
struct file_disk *fdisk = ctx;
@ -406,7 +406,7 @@ static const struct spdk_bdev_fn_table aio_fn_table = {
.submit_request = bdev_aio_submit_request,
.io_type_supported = bdev_aio_io_type_supported,
.get_io_channel = bdev_aio_get_io_channel,
.dump_config_json = bdev_aio_dump_config_json,
.dump_info_json = bdev_aio_dump_info_json,
};
static void aio_free_disk(struct file_disk *fdisk)

View File

@ -863,10 +863,10 @@ spdk_bdev_io_type_supported(struct spdk_bdev *bdev, enum spdk_bdev_io_type io_ty
}
int
spdk_bdev_dump_config_json(struct spdk_bdev *bdev, struct spdk_json_write_ctx *w)
spdk_bdev_dump_info_json(struct spdk_bdev *bdev, struct spdk_json_write_ctx *w)
{
if (bdev->fn_table->dump_config_json) {
return bdev->fn_table->dump_config_json(bdev->ctxt, w);
if (bdev->fn_table->dump_info_json) {
return bdev->fn_table->dump_info_json(bdev->ctxt, w);
}
return 0;

View File

@ -192,7 +192,7 @@ vbdev_error_destruct(void *ctx)
}
static int
vbdev_error_dump_config_json(void *ctx, struct spdk_json_write_ctx *w)
vbdev_error_dump_info_json(void *ctx, struct spdk_json_write_ctx *w)
{
struct error_disk *error_disk = ctx;
@ -210,7 +210,7 @@ vbdev_error_dump_config_json(void *ctx, struct spdk_json_write_ctx *w)
static struct spdk_bdev_fn_table vbdev_error_fn_table = {
.destruct = vbdev_error_destruct,
.submit_request = vbdev_error_submit_request,
.dump_config_json = vbdev_error_dump_config_json,
.dump_info_json = vbdev_error_dump_info_json,
};
static void

View File

@ -91,12 +91,12 @@ spdk_gpt_base_bdev_hotremove_cb(void *_base_bdev)
static int vbdev_gpt_destruct(void *ctx);
static void vbdev_gpt_submit_request(struct spdk_io_channel *_ch, struct spdk_bdev_io *bdev_io);
static int vbdev_gpt_dump_config_json(void *ctx, struct spdk_json_write_ctx *w);
static int vbdev_gpt_dump_info_json(void *ctx, struct spdk_json_write_ctx *w);
static struct spdk_bdev_fn_table vbdev_gpt_fn_table = {
.destruct = vbdev_gpt_destruct,
.submit_request = vbdev_gpt_submit_request,
.dump_config_json = vbdev_gpt_dump_config_json,
.dump_info_json = vbdev_gpt_dump_info_json,
};
static struct gpt_base *
@ -181,7 +181,7 @@ write_string_utf16le(struct spdk_json_write_ctx *w, const uint16_t *str, size_t
}
static int
vbdev_gpt_dump_config_json(void *ctx, struct spdk_json_write_ctx *w)
vbdev_gpt_dump_info_json(void *ctx, struct spdk_json_write_ctx *w)
{
struct gpt_disk *gpt_disk = ctx;
struct gpt_base *gpt_base = (struct gpt_base *)gpt_disk->part.base;

View File

@ -519,7 +519,7 @@ vbdev_lvol_destruct(void *ctx)
}
static int
vbdev_lvol_dump_config_json(void *ctx, struct spdk_json_write_ctx *w)
vbdev_lvol_dump_info_json(void *ctx, struct spdk_json_write_ctx *w)
{
struct spdk_lvol *lvol = ctx;
struct lvol_store_bdev *lvs_bdev;
@ -709,7 +709,7 @@ static struct spdk_bdev_fn_table vbdev_lvol_fn_table = {
.io_type_supported = vbdev_lvol_io_type_supported,
.submit_request = vbdev_lvol_submit_request,
.get_io_channel = vbdev_lvol_get_io_channel,
.dump_config_json = vbdev_lvol_dump_config_json,
.dump_info_json = vbdev_lvol_dump_info_json,
};
static struct spdk_bdev *

View File

@ -558,7 +558,7 @@ bdev_nvme_get_io_channel(void *ctx)
}
static int
bdev_nvme_dump_config_json(void *ctx, struct spdk_json_write_ctx *w)
bdev_nvme_dump_info_json(void *ctx, struct spdk_json_write_ctx *w)
{
struct nvme_bdev *nvme_bdev = ctx;
struct nvme_ctrlr *nvme_ctrlr = nvme_bdev->nvme_ctrlr;
@ -718,7 +718,7 @@ static const struct spdk_bdev_fn_table nvmelib_fn_table = {
.submit_request = bdev_nvme_submit_request,
.io_type_supported = bdev_nvme_io_type_supported,
.get_io_channel = bdev_nvme_get_io_channel,
.dump_config_json = bdev_nvme_dump_config_json,
.dump_info_json = bdev_nvme_dump_info_json,
.get_spin_time = bdev_nvme_get_spin_time,
};

View File

@ -249,7 +249,7 @@ bdev_pmem_get_io_channel(void *ctx)
}
static int
bdev_pmem_dump_config_json(void *ctx, struct spdk_json_write_ctx *w)
bdev_pmem_dump_info_json(void *ctx, struct spdk_json_write_ctx *w)
{
struct pmem_disk *pdisk = ctx;
@ -278,7 +278,7 @@ static const struct spdk_bdev_fn_table pmem_fn_table = {
.submit_request = bdev_pmem_submit_request,
.io_type_supported = bdev_pmem_io_type_supported,
.get_io_channel = bdev_pmem_get_io_channel,
.dump_config_json = bdev_pmem_dump_config_json,
.dump_info_json = bdev_pmem_dump_info_json,
};
int

View File

@ -530,7 +530,7 @@ bdev_rbd_get_io_channel(void *ctx)
}
static int
bdev_rbd_dump_config_json(void *ctx, struct spdk_json_write_ctx *w)
bdev_rbd_dump_info_json(void *ctx, struct spdk_json_write_ctx *w)
{
struct bdev_rbd *rbd_bdev = ctx;
@ -553,7 +553,7 @@ static const struct spdk_bdev_fn_table rbd_fn_table = {
.submit_request = bdev_rbd_submit_request,
.io_type_supported = bdev_rbd_io_type_supported,
.get_io_channel = bdev_rbd_get_io_channel,
.dump_config_json = bdev_rbd_dump_config_json,
.dump_info_json = bdev_rbd_dump_info_json,
};
struct spdk_bdev *

View File

@ -91,7 +91,7 @@ spdk_rpc_dump_bdev_info(struct spdk_json_write_ctx *w,
spdk_json_write_name(w, "driver_specific");
spdk_json_write_object_begin(w);
spdk_bdev_dump_config_json(bdev, w);
spdk_bdev_dump_info_json(bdev, w);
spdk_json_write_object_end(w);
spdk_json_write_object_end(w);

View File

@ -86,7 +86,7 @@ vbdev_split_submit_request(struct spdk_io_channel *_ch, struct spdk_bdev_io *bde
}
static int
vbdev_split_dump_config_json(void *ctx, struct spdk_json_write_ctx *w)
vbdev_split_dump_info_json(void *ctx, struct spdk_json_write_ctx *w)
{
struct spdk_bdev_part *part = ctx;
@ -106,7 +106,7 @@ vbdev_split_dump_config_json(void *ctx, struct spdk_json_write_ctx *w)
static struct spdk_bdev_fn_table vbdev_split_fn_table = {
.destruct = vbdev_split_destruct,
.submit_request = vbdev_split_submit_request,
.dump_config_json = vbdev_split_dump_config_json,
.dump_info_json = vbdev_split_dump_info_json,
};
static int

View File

@ -666,7 +666,7 @@ bdev_virtio_disk_destruct(void *ctx)
}
static int
bdev_virtio_dump_json_config(void *ctx, struct spdk_json_write_ctx *w)
bdev_virtio_dump_info_config(void *ctx, struct spdk_json_write_ctx *w)
{
struct virtio_scsi_disk *disk = ctx;
@ -679,7 +679,7 @@ static const struct spdk_bdev_fn_table virtio_fn_table = {
.submit_request = bdev_virtio_submit_request,
.io_type_supported = bdev_virtio_io_type_supported,
.get_io_channel = bdev_virtio_get_io_channel,
.dump_config_json = bdev_virtio_dump_json_config,
.dump_info_json = bdev_virtio_dump_info_config,
};
static void