diff --git a/include/spdk/bdev.h b/include/spdk/bdev.h index af094002a..c343fadd3 100644 --- a/include/spdk/bdev.h +++ b/include/spdk/bdev.h @@ -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. diff --git a/include/spdk_internal/bdev.h b/include/spdk_internal/bdev.h index d58e3f10c..41188c2a5 100644 --- a/include/spdk_internal/bdev.h +++ b/include/spdk_internal/bdev.h @@ -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. diff --git a/lib/bdev/aio/bdev_aio.c b/lib/bdev/aio/bdev_aio.c index 3554d9e17..8df682900 100644 --- a/lib/bdev/aio/bdev_aio.c +++ b/lib/bdev/aio/bdev_aio.c @@ -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) diff --git a/lib/bdev/bdev.c b/lib/bdev/bdev.c index b6309b9ae..e52d939b9 100644 --- a/lib/bdev/bdev.c +++ b/lib/bdev/bdev.c @@ -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; diff --git a/lib/bdev/error/vbdev_error.c b/lib/bdev/error/vbdev_error.c index 972591b39..c8f3eca7e 100644 --- a/lib/bdev/error/vbdev_error.c +++ b/lib/bdev/error/vbdev_error.c @@ -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 diff --git a/lib/bdev/gpt/vbdev_gpt.c b/lib/bdev/gpt/vbdev_gpt.c index 7488d13c7..c0f41e3ff 100644 --- a/lib/bdev/gpt/vbdev_gpt.c +++ b/lib/bdev/gpt/vbdev_gpt.c @@ -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; diff --git a/lib/bdev/lvol/vbdev_lvol.c b/lib/bdev/lvol/vbdev_lvol.c index 2b3ec8dc2..437e049b1 100644 --- a/lib/bdev/lvol/vbdev_lvol.c +++ b/lib/bdev/lvol/vbdev_lvol.c @@ -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 * diff --git a/lib/bdev/nvme/bdev_nvme.c b/lib/bdev/nvme/bdev_nvme.c index 7792aea03..6f2cc86b9 100644 --- a/lib/bdev/nvme/bdev_nvme.c +++ b/lib/bdev/nvme/bdev_nvme.c @@ -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, }; diff --git a/lib/bdev/pmem/bdev_pmem.c b/lib/bdev/pmem/bdev_pmem.c index 849402544..453278529 100644 --- a/lib/bdev/pmem/bdev_pmem.c +++ b/lib/bdev/pmem/bdev_pmem.c @@ -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 diff --git a/lib/bdev/rbd/bdev_rbd.c b/lib/bdev/rbd/bdev_rbd.c index 976812a49..9077673ab 100644 --- a/lib/bdev/rbd/bdev_rbd.c +++ b/lib/bdev/rbd/bdev_rbd.c @@ -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 * diff --git a/lib/bdev/rpc/bdev_rpc.c b/lib/bdev/rpc/bdev_rpc.c index b2ad0fffa..62d690265 100644 --- a/lib/bdev/rpc/bdev_rpc.c +++ b/lib/bdev/rpc/bdev_rpc.c @@ -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); diff --git a/lib/bdev/split/vbdev_split.c b/lib/bdev/split/vbdev_split.c index 158b4a5ae..9482c4374 100644 --- a/lib/bdev/split/vbdev_split.c +++ b/lib/bdev/split/vbdev_split.c @@ -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 diff --git a/lib/bdev/virtio/bdev_virtio_scsi.c b/lib/bdev/virtio/bdev_virtio_scsi.c index 51bb7b36d..692f9e109 100644 --- a/lib/bdev/virtio/bdev_virtio_scsi.c +++ b/lib/bdev/virtio/bdev_virtio_scsi.c @@ -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