diff mbox

[ndctl,1/4] ndctl, create-namespace: fix --map= reconfiguration for device-dax

Message ID 151079864874.25456.11655607153151633382.stgit@dwillia2-desk3.amr.corp.intel.com (mailing list archive)
State Accepted
Commit b813de017bc4
Headers show

Commit Message

Dan Williams Nov. 16, 2017, 2:17 a.m. UTC
Allow the memmap location to be changed when reconfiguring a device-dax
mode namespace.

Fixes: 3139dfda1158 ("ndctl: create namespace")
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 ndctl/namespace.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/ndctl/namespace.c b/ndctl/namespace.c
index 58f23ad0877a..0020be354670 100644
--- a/ndctl/namespace.c
+++ b/ndctl/namespace.c
@@ -198,7 +198,8 @@  static int set_defaults(enum device_action mode)
 		}
 
 		if (!param.reconfig && param.mode
-				&& strcmp(param.mode, "memory") != 0) {
+				&& strcmp(param.mode, "memory") != 0
+				&& strcmp(param.mode, "dax") != 0) {
 			error("--map only valid for a memory mode pmem namespace\n");
 			rc = -EINVAL;
 		}