ndctl, create-namespace: include dax info in operation result BZ: commit 77d84b249ef51b6dbccd988e42ce2ab2962a9b36 Author: Dan Williams Date: Thu Mar 2 14:10:11 2017 -0800 ndctl, create-namespace: include dax info in operation result 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 Signed-off-by: Dan Williams diff --git a/ndctl/builtin-xaction-namespace.c b/ndctl/builtin-xaction-namespace.c index 46d651e..05575c5 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,