linux-nvdimm.lists.01.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ndctl, create-namespace: include dax info in operation result
@ 2017-03-02 22:13 Dan Williams
  0 siblings, 0 replies; only message in thread
From: Dan Williams @ 2017-03-02 22:13 UTC (permalink / raw)
  To: linux-nvdimm

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@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@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,

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-02 22:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-02 22:13 [PATCH] ndctl, create-namespace: include dax info in operation result Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).