From patchwork Thu Jan 28 22:52:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 8154801 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 0F8F3BEEE5 for ; Thu, 28 Jan 2016 22:52:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4D4EA202F8 for ; Thu, 28 Jan 2016 22:52:53 +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 66A6020320 for ; Thu, 28 Jan 2016 22:52:52 +0000 (UTC) Received: from ml01.vlan14.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 5C20E1A245D; Thu, 28 Jan 2016 14:52:52 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by ml01.01.org (Postfix) with ESMTP id C53A61A222A for ; Thu, 28 Jan 2016 14:52:51 -0800 (PST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 28 Jan 2016 14:52:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,360,1449561600"; d="scan'208";a="643163602" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.136]) by FMSMGA003.fm.intel.com with ESMTP; 28 Jan 2016 14:52:48 -0800 Subject: [ndctl PATCH 05/13] ndctl: don't fail requests to delete "io" namespaces From: Dan Williams To: linux-nvdimm@lists.01.org Date: Thu, 28 Jan 2016 14:52:24 -0800 Message-ID: <20160128225223.17855.50025.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <20160128225157.17855.5190.stgit@dwillia2-desk3.amr.corp.intel.com> References: <20160128225157.17855.5190.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.17 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=-1.9 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 Otherwise this forces callers of ndctl_namespace_delete() to filter on namespace type before calling. Signed-off-by: Dan Williams --- lib/libndctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libndctl.c b/lib/libndctl.c index 22bd2c123415..1b6525035ae3 100644 --- a/lib/libndctl.c +++ b/lib/libndctl.c @@ -3372,10 +3372,10 @@ NDCTL_EXPORT int ndctl_namespace_delete(struct ndctl_namespace *ndns) case ND_DEVICE_NAMESPACE_BLK: break; default: - dbg(ctx, "%s: nstype: %d delete failed\n", + dbg(ctx, "%s: nstype: %d not deletable\n", ndctl_namespace_get_devname(ndns), ndctl_namespace_get_type(ndns)); - return -ENXIO; + return 0; } rc = namespace_set_size(ndns, 0);