Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp598172ybl; Fri, 16 Aug 2019 00:40:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqzwyDvy8+exQi8Aon4EbN50V5rN3ctg5Pq5OAOJCgeeI9mK9PbeYLqnFyCPlwW95j01cpfu X-Received: by 2002:a17:90a:2069:: with SMTP id n96mr5857202pjc.4.1565941217491; Fri, 16 Aug 2019 00:40:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565941217; cv=none; d=google.com; s=arc-20160816; b=wzTvTtqCHCr1r/xW+yBhLfPnjO9Lf7vwDwPu8bRrGqjb456Uf7x25wR06V8X+ctQvi z1mxJh2IZcCpMt3Mimmfi1CnA5GDuTN3fDunRi4XovG2Wxx2TH/cPEBpbYFDpcymRxPd Lm9VgGoFdm0JXoSN7Ue1zLt2XlCVXjjabjwj/ju/8X5rBXnYOFRgEGtVl796LIHKA8H2 +R5x1RMYSqanUQIrMAmw+QxaG05WIRkz5mA7YMvgsEL7JmaV94ukOKEW4RckQyngJEh4 yym1Ot/xSZNSFD8RlkWm/6BKzc2npr9UKFDehqoZM87pGNvVns6SuRF+FVl2UNU/YwWS OfJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=tAnGodIkdecWkY8Lix8vxXv7GmIDwxPJLuDp+gJoiYE=; b=MT10iudjIqmEBYc6L2LK83yLMZrDe+Ck+JWFDTFsSc1XrFY9WXSGfLSsb3XRc6Fs1c bAbIC+N6iD87py1gOaJmENZ4Sj0pLLpBD8WjoJe4UqI7KLzHc8zDFsAF6gRls9bvVkxp hM9njZgMQSoy0XaTgUpZCQTnLfvv5fGy7UvGjjGuqkdLZbCmae9TZuzZcVW3zXsLZbHM tdDkgLdyuwRJQ7Oai5SAylVUiiLsbl53kVhjXpteLpcwgZsQPRUGhkQmx1NoeRKvmdRb Q6AhN+vcXC3B4HwP6PgCb2AlEn+XecZQzhXtpZm9pMWKblHNnSs3beDqvDihbSnRVsM8 GuLQ== ARC-Authentication-Results: i=1; mx.google.com; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w12si3305524pgs.364.2019.08.16.00.39.52; Fri, 16 Aug 2019 00:40:17 -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; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726690AbfHPHgQ (ORCPT + 99 others); Fri, 16 Aug 2019 03:36:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60006 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726139AbfHPHgP (ORCPT ); Fri, 16 Aug 2019 03:36:15 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 833BC369D3; Fri, 16 Aug 2019 07:36:15 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7302F19C6A; Fri, 16 Aug 2019 07:36:15 +0000 (UTC) Received: from zmail21.collab.prod.int.phx2.redhat.com (zmail21.collab.prod.int.phx2.redhat.com [10.5.83.24]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 5E8582551B; Fri, 16 Aug 2019 07:36:15 +0000 (UTC) Date: Fri, 16 Aug 2019 03:36:14 -0400 (EDT) From: Pankaj Gupta To: Dan Williams Cc: linux-nvdimm , Linux Kernel Mailing List , Vishal L Verma , Dave Jiang , Keith Busch , Ira Weiny Message-ID: <1526809439.8842269.1565940974952.JavaMail.zimbra@redhat.com> In-Reply-To: References: <20190731111207.12836-1-pagupta@redhat.com> Subject: Re: [PATCH] libnvdimm: change disk name of virtio pmem disk MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.116.204, 10.4.195.21] Thread-Topic: libnvdimm: change disk name of virtio pmem disk Thread-Index: 9nluNaz18R3eUqbznRETd5vqCIb7PA== X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 16 Aug 2019 07:36:15 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > > 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. o.k. I will look to add the information in sysfs and display using ndctl. Thanks, Pankaj > > > > 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 > > >