Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp546535ybl; Mon, 12 Aug 2019 22:02:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2N24jrawIVh5cBFJPV/KwK3WE+ULk3+kmesCqWajRnn8jkbdnO4jbA8E9rTyXkrlz1mxg X-Received: by 2002:a63:f941:: with SMTP id q1mr33099552pgk.350.1565672566246; Mon, 12 Aug 2019 22:02:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565672566; cv=none; d=google.com; s=arc-20160816; b=INQJCCXIwlcc7J56Feh80BK0x+/nb21L+sS6y/ijAIrEXTq0JR6fP0IXPJohGFSMtl iTWGRpxOfDxEVqUaB+kGrMv9Mk3raFxRtyCW5RslIWcr+74kNcebK8sdnR5msvEGijuF BMxhHdFMpIyAWGxNJ92mYV8a+OPYEdGRlBURZOMlvulfn9t8Szm6+DwculYK4OjgXCcG +fAJahYWNHWhasQxQHZmyMEnAPHvKBOTkC/+xTCG9isjwcXs9ROTErReoFbmCOOuzruU lfCCV/8zr7ffeqyfJfq1bVGYIqmyUc2NhN4/8R+oY1dcVT5MbFOqUhsUm13Aw0RSJU1B 9nXw== 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=L/k9wAK04P/vtxfkr0j/7Hc3CJsNNPh9NIgRJCQqnAM=; b=vkjhn96fCyaMtRPemo/jabI4weuVzyIpKYaS+V0a8eLFChn9T2hEcytQQ2BJGtYsbp u4OeIDgK49YdjMZx5HXd8Iq/Y+Z63aZoJNNEGsXtWwjSWER8mNuj+RYHznrbIdhMRLCu zOQkl2ofy2rcDLhd2fkT6Q1wQL4WXqB2Eguypxi1lZvnZaxude+xC8HVs4sI7mXg7pd9 sidUeZvfeNrSwHKsqvs103HDSMZ88+Rt2EmHmrJ5GrYjP2zSnquXFTY8FN44Vmo67i7w ktqkKfn2bxswq1oe/pNtbKYNt9OsBxk5rSZXn+zYKEcY9v/oa4oYJDrHQDtPwoVFXUgR eiTA== 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 a59si60819467plc.319.2019.08.12.22.02.30; Mon, 12 Aug 2019 22:02:46 -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 S1726816AbfHMEzi (ORCPT + 99 others); Tue, 13 Aug 2019 00:55:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33202 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725820AbfHMEzh (ORCPT ); Tue, 13 Aug 2019 00:55:37 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 51ED33001A9A; Tue, 13 Aug 2019 04:55:37 +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 45320600C6; Tue, 13 Aug 2019 04:55:37 +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 2CA2D4A460; Tue, 13 Aug 2019 04:55:37 +0000 (UTC) Date: Tue, 13 Aug 2019 00:55:37 -0400 (EDT) From: Pankaj Gupta To: dan j williams Cc: linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, vishal l verma , dave jiang , keith busch , ira weiny Message-ID: <633367382.8144845.1565672137069.JavaMail.zimbra@redhat.com> In-Reply-To: <20190731111207.12836-1-pagupta@redhat.com> 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.143, 10.4.195.9] Thread-Topic: libnvdimm: change disk name of virtio pmem disk Thread-Index: ASQEzVN+jHT3VdoSZrcGE/HqL5+QgQ== X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Tue, 13 Aug 2019 04:55:37 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ping. > > This patch adds prefix 'v' in disk name for virtio pmem. > This differentiates virtio-pmem disks from the pmem disks. > > 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 > >