When modifying or creating a namespace in "dax" mode, include the
device-dax information so that resulting character device is included in
the output.
Before:
# ndctl create-namespace --reconfig=namespace1.0 --mode=dax --force
{
"dev":"namespace1.0",
"mode":"dax",
"size":4225761280,
"uuid":"55082055-70f8-40eb-b131-d59f6f537df5"
}
After:
# ndctl create-namespace --reconfig=namespace1.0 --mode=dax --force
{
"dev":"namespace1.0",
"mode":"dax",
"size":4225761280,
"uuid":"1ccc310a-04af-4a57-88a4-6011c2825b95",
"daxregion":{
"id":1,
"size":4225761280,
"align":2097152,
"devices":[
{
"chardev":"dax1.0",
"size":4225761280
}
]
}
}
Reported-by: Dave Jiang <dave.jiang(a)intel.com>
Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
---
ndctl/builtin-xaction-namespace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ndctl/builtin-xaction-namespace.c b/ndctl/builtin-xaction-namespace.c
index 46d651e86153..05575c50446d 100644
--- a/ndctl/builtin-xaction-namespace.c
+++ b/ndctl/builtin-xaction-namespace.c
@@ -361,7 +361,7 @@ static int setup_namespace(struct ndctl_region *region,
error("%s: failed to enable\n",
ndctl_namespace_get_devname(ndns));
} else {
- struct json_object *jndns = util_namespace_to_json(ndns, 0, 0);
+ struct json_object *jndns = util_namespace_to_json(ndns, 0, 1);
if (jndns)
printf("%s\n", json_object_to_json_string_ext(jndns,
Show replies by date