bdev/aio: dump filename in driver_specific JSON
Change-Id: I0e8c34237acc88fb51bac56c2f99df52ec199f9b Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/373835 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
6d5285bdfb
commit
187e5d1c52
@ -40,6 +40,7 @@
|
|||||||
#include "spdk/env.h"
|
#include "spdk/env.h"
|
||||||
#include "spdk/fd.h"
|
#include "spdk/fd.h"
|
||||||
#include "spdk/io_channel.h"
|
#include "spdk/io_channel.h"
|
||||||
|
#include "spdk/json.h"
|
||||||
#include "spdk/util.h"
|
#include "spdk/util.h"
|
||||||
|
|
||||||
#include "spdk_internal/log.h"
|
#include "spdk_internal/log.h"
|
||||||
@ -320,11 +321,29 @@ bdev_aio_get_io_channel(void *ctx)
|
|||||||
return spdk_get_io_channel(&fdisk->fd);
|
return spdk_get_io_channel(&fdisk->fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
bdev_aio_dump_config_json(void *ctx, struct spdk_json_write_ctx *w)
|
||||||
|
{
|
||||||
|
struct file_disk *fdisk = ctx;
|
||||||
|
|
||||||
|
spdk_json_write_name(w, "aio");
|
||||||
|
spdk_json_write_object_begin(w);
|
||||||
|
|
||||||
|
spdk_json_write_name(w, "filename");
|
||||||
|
spdk_json_write_string(w, fdisk->filename);
|
||||||
|
|
||||||
|
spdk_json_write_object_end(w);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static const struct spdk_bdev_fn_table aio_fn_table = {
|
static const struct spdk_bdev_fn_table aio_fn_table = {
|
||||||
.destruct = bdev_aio_destruct,
|
.destruct = bdev_aio_destruct,
|
||||||
.submit_request = bdev_aio_submit_request,
|
.submit_request = bdev_aio_submit_request,
|
||||||
.io_type_supported = bdev_aio_io_type_supported,
|
.io_type_supported = bdev_aio_io_type_supported,
|
||||||
.get_io_channel = bdev_aio_get_io_channel,
|
.get_io_channel = bdev_aio_get_io_channel,
|
||||||
|
.dump_config_json = bdev_aio_dump_config_json,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void aio_free_disk(struct file_disk *fdisk)
|
static void aio_free_disk(struct file_disk *fdisk)
|
||||||
|
Loading…
Reference in New Issue
Block a user