Commit 2939b715 authored by Pawel Wodkowski's avatar Pawel Wodkowski Committed by Jim Harris
Browse files

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: default avatarPawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/401216


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 1f94a999
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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.
+2 −2
Original line number Diff line number Diff line
@@ -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.
+2 −2
Original line number Diff line number Diff line
@@ -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)
+3 −3
Original line number Diff line number Diff line
@@ -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;
+2 −2
Original line number Diff line number Diff line
@@ -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
Loading