bdev/lvol: add module name to driver_specific JSON
This allows the caller to know which bdev module is exporting the bdev and therefore how to interpret the driver_specific fields. Change-Id: I09641645875827eabc0a831fff5b0b5bed6b03d0 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/382519 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
04b2fee404
commit
b10dac2c78
@ -300,12 +300,17 @@ vbdev_lvol_dump_config_json(void *ctx, struct spdk_json_write_ctx *w)
|
||||
struct lvol_store_bdev *lvs_bdev;
|
||||
struct spdk_bdev *bdev;
|
||||
|
||||
spdk_json_write_name(w, "lvol");
|
||||
spdk_json_write_object_begin(w);
|
||||
|
||||
lvs_bdev = vbdev_get_lvs_bdev_by_lvs(lvol->lvol_store);
|
||||
bdev = lvs_bdev->bdev;
|
||||
|
||||
spdk_json_write_name(w, "base_bdev");
|
||||
spdk_json_write_string(w, spdk_bdev_get_name(bdev));
|
||||
|
||||
spdk_json_write_object_end(w);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -262,6 +262,18 @@ spdk_json_write_string(struct spdk_json_write_ctx *w, const char *val)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
spdk_json_write_object_begin(struct spdk_json_write_ctx *w)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
spdk_json_write_object_end(struct spdk_json_write_ctx *w)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *
|
||||
spdk_bdev_get_name(const struct spdk_bdev *bdev)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user