From patchwork Mon May 16 18:31:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 9104931 Return-Path: X-Original-To: patchwork-linux-nvdimm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 80D99BF29F for ; Mon, 16 May 2016 18:31:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C232E2026C for ; Mon, 16 May 2016 18:31:49 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F34E520268 for ; Mon, 16 May 2016 18:31:48 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0C8E01A1F7A; Mon, 16 May 2016 11:31:53 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by ml01.01.org (Postfix) with ESMTP id DDF521A1F7A for ; Mon, 16 May 2016 11:31:51 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 16 May 2016 11:31:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,627,1459839600"; d="scan'208";a="978110752" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.14]) by orsmga002.jf.intel.com with ESMTP; 16 May 2016 11:31:47 -0700 Subject: [ndctl PATCH] ndctl: fix destruction of "dax" mode namespaces From: Dan Williams To: linux-nvdimm@lists.01.org Date: Mon, 16 May 2016 11:31:01 -0700 Message-ID: <146342346104.22015.12393621481904572200.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.17.1-9-g687f MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP At destruct time disassociate the namespace from its dax device configuration to enable the info block to be cleared. Signed-off-by: Dan Williams Reviewed-by: Johannes Thumshirn --- builtin-xaction-namespace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);