lvol: display thin_provision property during get_bdevs
Change-Id: Ib3507a9e69b210cbd173c88d166025d4579e0149 Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/397602 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
33a97f2e3f
commit
e87d3400a5
@ -102,6 +102,7 @@ struct spdk_lvol {
|
||||
char *unique_id;
|
||||
char name[SPDK_LVOL_NAME_MAX];
|
||||
bool close_only;
|
||||
bool thin_provision;
|
||||
struct spdk_bdev *bdev;
|
||||
int ref_count;
|
||||
bool action_in_progress;
|
||||
|
@ -480,6 +480,9 @@ vbdev_lvol_dump_config_json(void *ctx, struct spdk_json_write_ctx *w)
|
||||
spdk_json_write_name(w, "base_bdev");
|
||||
spdk_json_write_string(w, spdk_bdev_get_name(bdev));
|
||||
|
||||
spdk_json_write_name(w, "thin_provision");
|
||||
spdk_json_write_bool(w, lvol->thin_provision);
|
||||
|
||||
spdk_json_write_object_end(w);
|
||||
|
||||
return 0;
|
||||
|
@ -964,6 +964,7 @@ spdk_lvol_create(struct spdk_lvol_store *lvs, const char *name, uint64_t sz,
|
||||
num_clusters = divide_round_up(sz, spdk_bs_get_cluster_size(bs));
|
||||
lvol->num_clusters = num_clusters;
|
||||
lvol->close_only = false;
|
||||
lvol->thin_provision = thin_provision;
|
||||
strncpy(lvol->name, name, SPDK_LVS_NAME_MAX);
|
||||
req->lvol = lvol;
|
||||
|
||||
|
@ -410,6 +410,12 @@ spdk_json_write_string(struct spdk_json_write_ctx *w, const char *val)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
spdk_json_write_bool(struct spdk_json_write_ctx *w, bool val)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
spdk_json_write_object_begin(struct spdk_json_write_ctx *w)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user