diff mbox

[ndctl,7/9] ndctl, create-namespace: fix device-dax vs --map=

Message ID 146698350487.40541.7666344068449948979.stgit@dwillia2-desk3.amr.corp.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Williams June 26, 2016, 11:25 p.m. UTC
Teach validate_namespace_options() about the valid device-dax scenario
of specifying a map location.

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

Patch

diff --git a/ndctl/builtin-xaction-namespace.c b/ndctl/builtin-xaction-namespace.c
index 7bf3320473ff..24a8d08c58f2 100644
--- a/ndctl/builtin-xaction-namespace.c
+++ b/ndctl/builtin-xaction-namespace.c
@@ -442,7 +442,8 @@  static int validate_namespace_options(struct ndctl_region *region,
 		else
 			p->loc = NDCTL_PFN_LOC_PMEM;
 
-		if (ndns && p->mode != NDCTL_NS_MODE_MEMORY) {
+		if (ndns && p->mode != NDCTL_NS_MODE_MEMORY
+			&& p->mode != NDCTL_NS_MODE_DAX) {
 			debug("%s: --map= only valid for memory mode namespace\n",
 				ndctl_namespace_get_devname(ndns));
 			return -EINVAL;