From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4398C43331 for ; Tue, 12 Nov 2019 19:23:23 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A0F0E21783 for ; Tue, 12 Nov 2019 19:23:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A0F0E21783 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvdimm-bounces@lists.01.org Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id C1277100DC415; Tue, 12 Nov 2019 11:25:07 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=vishal.l.verma@intel.com; receiver= Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5E4A7100EA626 for ; Tue, 12 Nov 2019 11:25:04 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Nov 2019 11:23:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,297,1569308400"; d="scan'208";a="378984375" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga005.jf.intel.com with ESMTP; 12 Nov 2019 11:23:18 -0800 Received: from fmsmsx113.amr.corp.intel.com ([169.254.13.47]) by fmsmsx104.amr.corp.intel.com ([169.254.3.245]) with mapi id 14.03.0439.000; Tue, 12 Nov 2019 11:23:17 -0800 From: "Verma, Vishal L" To: "linux-nvdimm@lists.01.org" Subject: Re: [ndctl PATCH v2 1/2] ndctl/namespace: Rework counts reported by enable-namespace Thread-Topic: [ndctl PATCH v2 1/2] ndctl/namespace: Rework counts reported by enable-namespace Thread-Index: AQHVk/5RXwEQdD2e/kqHwdj/93yMgaeIe2MA Date: Tue, 12 Nov 2019 19:23:17 +0000 Message-ID: References: <20191105172713.3628-1-vishal.l.verma@intel.com> In-Reply-To: <20191105172713.3628-1-vishal.l.verma@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Evolution 3.32.4 (3.32.4-1.fc30) x-originating-ip: [10.232.112.164] Content-ID: MIME-Version: 1.0 Message-ID-Hash: NTOQIUGSKDSKXCGVSNJ5IQGQL56ASBS6 X-Message-ID-Hash: NTOQIUGSKDSKXCGVSNJ5IQGQL56ASBS6 X-MailFrom: vishal.l.verma@intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: "aneesh.kumar@linux.ibm.com" X-Mailman-Version: 3.1.1 Precedence: list List-Id: "Linux-nvdimm developer list." Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Tue, 2019-11-05 at 10:27 -0700, Vishal Verma wrote: > Add detection of 'seed' namespaces > (ndctl_namespace_is_configuration_idle()) to the enable-namespace > operatiuon and libndctl API. In libndctl, return a '1' for seed > namespaces. In namespace.c, reinterpret a '1' based on a check for a > seed namespace, and decide on skip vs success accordingly. Collect this > into a new namespace_enable helper, and make the reported count > consistent by also skipping namespaces that were already enabled. > > Link: https://github.com/pmem/ndctl/issues/119 > Reported-by: Aneesh Kumar K.V > Cc: Dan Williams > Signed-off-by: Vishal Verma > --- > > Changes in v2: > - The kernel is the ultimate authority on enabling namespaces, so we > should let it make the decision of how to handle seed namespaces > instead of preemptively skipping them. Let the kernel make that > decision, and fix up error reporting after the fact. These break the unit tests, so I'll have to take another look at this. I suspect the added complexity is probably not worth the few extra prints from seed namespaces for operations using the 'all' keyword. _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org