From patchwork Fri Apr 22 19:47:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 8915381 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 2EA91BF29F for ; Fri, 22 Apr 2016 19:48:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 42C382021B for ; Fri, 22 Apr 2016 19:48:14 +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 6860B20212 for ; Fri, 22 Apr 2016 19:48:13 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 5E35E1A2070; Fri, 22 Apr 2016 12:48:13 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by ml01.01.org (Postfix) with ESMTP id 5A5701A2070 for ; Fri, 22 Apr 2016 12:48:12 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 22 Apr 2016 12:48:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,518,1455004800"; d="scan'208";a="690676800" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.14]) by FMSMGA003.fm.intel.com with ESMTP; 22 Apr 2016 12:48:12 -0700 Subject: [ndctl PATCH 4/8] ndctl, create-namespace: report failures due to namespace being mounted From: Dan Williams To: linux-nvdimm@lists.01.org Date: Fri, 22 Apr 2016 12:47:23 -0700 Message-ID: <146135444310.4228.7151000859132505494.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <146135442234.4228.904225076597683142.stgit@dwillia2-desk3.amr.corp.intel.com> References: <146135442234.4228.904225076597683142.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=-2.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 In the case when a filesystem is mounted on a namespace targeted for reconfiguration or destruction, emit a message so the user knows to unmount the filesystem. Signed-off-by: Dan Williams --- builtin-xaction-namespace.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builtin-xaction-namespace.c b/builtin-xaction-namespace.c index 53ff82bc2c8d..e2e6d518c64d 100644 --- a/builtin-xaction-namespace.c +++ b/builtin-xaction-namespace.c @@ -550,6 +550,8 @@ static int namespace_destroy(struct ndctl_region *region, * stopping the !bdev case from racing to mount an fs or * re-enabling the namepace. */ + error("%s: %s is mounted, failing operation\n", + devname, bdev); return -EBUSY; } }