diff mbox

[ndctl] ndctl: fix destruction of "dax" mode namespaces

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

Commit Message

Dan Williams May 16, 2016, 6:31 p.m. UTC
At destruct time disassociate the namespace from its dax device
configuration to enable the info block to be cleared.

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

Comments

Johannes Thumshirn May 17, 2016, 7:34 a.m. UTC | #1
On Mon, May 16, 2016 at 11:31:01AM -0700, Dan Williams wrote:
> At destruct time disassociate the namespace from its dax device
> configuration to enable the info block to be cleared.
> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
diff mbox

Patch

diff --git a/builtin-xaction-namespace.c b/builtin-xaction-namespace.c
index 286628b16532..8ce7c3e55216 100644
--- a/builtin-xaction-namespace.c
+++ b/builtin-xaction-namespace.c
@@ -603,7 +603,8 @@  static int namespace_destroy(struct ndctl_region *region,
 					devname, bdev, strerror(errno));
 			return -errno;
 		}
-	}
+	} else if (dax_active)
+		ndctl_namespace_disable_invalidate(ndns);
 
 	if (pfn || btt || dax) {
 		rc = zero_info_block(ndns);