Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp48744ybl; Thu, 15 Aug 2019 12:24:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzDnMjPPKHEbk/PbfQrsMyBL2IwPWcu80mAECK3pw37uxLHemZsBESCwsVVcku6pCaxYq1S X-Received: by 2002:a63:ec48:: with SMTP id r8mr4469091pgj.387.1565897064964; Thu, 15 Aug 2019 12:24:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565897064; cv=none; d=google.com; s=arc-20160816; b=YKF1SqKccuaOfvWFiz6o5+0DGvesUZorGHqa+zKpUCvpjJcOe5kTTD3K4LTajWcy2z a0Hs8L7sdBTPqljkja/pmIO9X+GGXWpcNeKxGX7eftkTAPAzhKg8i2uoqR/np/glamRw GnyeANucXBuMomYI9TCSZcqBDX/DaZlqa4IBWbUhX+lYEJOsDHRhrRZY3y+qlXTVA5aX myVtAzC4mscQVuN1CVpfuhfBbdRq9PewjiWocICKwmcI3wbZNk5nwL0+r0+1fHxrEHqe 0k3xwqc1ZOeH6T7vTW8rpXQ+fsMNnwQ8uKi87ZIPmEjJV94XN4KEhj9ARbs7l59W4UWt AOmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=L0GqPPZ3ptyjBkt7aBOY+B9eZEmSOFdqgFUkWXmTO1k=; b=KSSIhbwivfykTsNyfncWB2wC63az52b32R73/ry8qHvvXfTPJc2S0BKQPQCzMkbeB5 NpIy7krX1J12k+vF2AnOeo51caZKHBifLU4LrnxH4L/pld9aWpxpeLlk7c7ed96jNQGb q4pBsb/38hl96kI3crl6Pqk82cKZAaKuqNvn2yRM9Mx75z0DapgWk//c0dnIuft58ZuS yVr0Mdm9ZGfAOggUaj4aV6q9kCVE9fb9j1dvf4p3lNGnnd0L/grMzxQdd11a8qGprkEF N0S3mhFRofvHSR5rwgUmzH7Ck+5z6uWTGBhflLeqflSPXoVtdaQH6P89ZHZyzbKO6ZPY AkyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=elMBytnS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1si1485863pjt.51.2019.08.15.12.24.09; Thu, 15 Aug 2019 12:24:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=elMBytnS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730277AbfHOR2m (ORCPT + 99 others); Thu, 15 Aug 2019 13:28:42 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:39236 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726203AbfHOR2m (ORCPT ); Thu, 15 Aug 2019 13:28:42 -0400 Received: by mail-ot1-f65.google.com with SMTP id b1so7162964otp.6 for ; Thu, 15 Aug 2019 10:28:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=L0GqPPZ3ptyjBkt7aBOY+B9eZEmSOFdqgFUkWXmTO1k=; b=elMBytnSkJObtOhpcJ7Xs6NSK2Zels7ZXnuvJKtDo7E/y+sRTtehbpYEgdfEqVVQAe KqeV+Z/+6xSDjCkXSbhKtJON1HD6dEg1WDp7qu0NyKIMHY5WsaUDYZlEZacJsR4pyi8Q pPMcC4GNOtrTkW3MLpbzTNHtf+c/XjrlNS7OteTSuWtNE6x+0XFsOYDqGE+Qy89vO/b5 ciRfccITYue+8mjdkhKDrJAbD+tZMNI/plcncKU6yK+YbrNSQdoX/jyJ+qIIAYeUHtSk lBVKTMSqji4XkczEOouA5UsRHjFT2PCvgxarNlqjY80Dk52+BQLUJpFREPWdLB8oxDiO GLxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=L0GqPPZ3ptyjBkt7aBOY+B9eZEmSOFdqgFUkWXmTO1k=; b=X+B0289ohiS3yWLwX6uKar5KhyLWEC6UtFBJxAny+hfZ7PzaOxq4rcVC3x7CQXsfUa 4lFwkUuxytvUZD29IAdc+DP7kJGH6/zGzEKbM2pCyeswL+6KmHSiSxgKkFdNVKt0AV6N vBD3hUeBJ7b3POszLZzhLpNWWnIdiPbfQIa9UAoHUB9SZ3FHmRcEZwZON61Pq5KY4ohA B5fX6Yr+hqGLpUik3NjT7JtM6qsLxSS5OMJvtfdvPOJONK0W2E1dZmkFLCjqgF1iTGRL DG9TPmehUnRkdPzRyTThyxbbd337cr72vs27Q4EOVtLI7kaWVuoPRX8C0I3rbzl/gQw4 FZ7g== X-Gm-Message-State: APjAAAXd4ZZRnjhsGI89zyX2U6JW42P6iNZbQPHWHxyMVuZirrPvjo80 j3H1ne651WuCp9znHlSCgRWcQa+sKvg+vpugBOAoMh3n X-Received: by 2002:a05:6830:458:: with SMTP id d24mr4109027otc.126.1565890121099; Thu, 15 Aug 2019 10:28:41 -0700 (PDT) MIME-Version: 1.0 References: <20190731111207.12836-1-pagupta@redhat.com> In-Reply-To: <20190731111207.12836-1-pagupta@redhat.com> From: Dan Williams Date: Thu, 15 Aug 2019 10:28:30 -0700 Message-ID: Subject: Re: [PATCH] libnvdimm: change disk name of virtio pmem disk To: Pankaj Gupta Cc: linux-nvdimm , Linux Kernel Mailing List , Vishal L Verma , Dave Jiang , Keith Busch , "Weiny, Ira" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 31, 2019 at 4:12 AM Pankaj Gupta wrote: > > This patch adds prefix 'v' in disk name for virtio pmem. > This differentiates virtio-pmem disks from the pmem disks. I don't think the small matter that this device does not support MAP_SYNC warrants a separate naming scheme. That said I do think we need to export this attribute in sysfs, likely at the region level, and then display that information in ndctl. This is distinct from the btt case where it is operating a different data consistency contract than baseline pmem. > > Signed-off-by: Pankaj Gupta > --- > drivers/nvdimm/namespace_devs.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c > index a16e52251a30..8e5d29266fb0 100644 > --- a/drivers/nvdimm/namespace_devs.c > +++ b/drivers/nvdimm/namespace_devs.c > @@ -182,8 +182,12 @@ const char *nvdimm_namespace_disk_name(struct nd_namespace_common *ndns, > char *name) > { > struct nd_region *nd_region = to_nd_region(ndns->dev.parent); > + const char *prefix = ""; > const char *suffix = NULL; > > + if (!is_nvdimm_sync(nd_region)) > + prefix = "v"; > + > if (ndns->claim && is_nd_btt(ndns->claim)) > suffix = "s"; > > @@ -201,7 +205,7 @@ const char *nvdimm_namespace_disk_name(struct nd_namespace_common *ndns, > sprintf(name, "pmem%d.%d%s", nd_region->id, nsidx, > suffix ? suffix : ""); > else > - sprintf(name, "pmem%d%s", nd_region->id, > + sprintf(name, "%spmem%d%s", prefix, nd_region->id, > suffix ? suffix : ""); > } else if (is_namespace_blk(&ndns->dev)) { > struct nd_namespace_blk *nsblk; > -- > 2.20.1 >