GNU logs - #21018, boring messages


Message sent to bug-parted@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#21018: Support for "libnvdimm BLK" devices
Resent-From: Dan Williams <dan.j.williams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-parted@HIDDEN
Resent-Date: Thu, 09 Jul 2015 17:05:02 +0000
Resent-Message-ID: <handler.21018.B.143646147530846 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 21018
X-GNU-PR-Package: parted
X-GNU-PR-Keywords: 
To: 21018 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-parted@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.143646147530846
          (code B ref -1); Thu, 09 Jul 2015 17:05:02 +0000
Received: (at submit) by debbugs.gnu.org; 9 Jul 2015 17:04:35 +0000
Received: from localhost ([127.0.0.1]:45387 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZDFFS-00081R-FQ
	for submit <at> debbugs.gnu.org; Thu, 09 Jul 2015 13:04:35 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43518)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <dan.j.williams@HIDDEN>) id 1ZDFBQ-0007uh-Ca
 for submit <at> debbugs.gnu.org; Thu, 09 Jul 2015 13:00:25 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <dan.j.williams@HIDDEN>) id 1ZDFBK-0008OM-4Q
 for submit <at> debbugs.gnu.org; Thu, 09 Jul 2015 13:00:19 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:43388)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <dan.j.williams@HIDDEN>) id 1ZDFBK-0008OH-1X
 for submit <at> debbugs.gnu.org; Thu, 09 Jul 2015 13:00:18 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:57013)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <dan.j.williams@HIDDEN>) id 1ZDFBJ-00084M-1d
 for bug-parted@HIDDEN; Thu, 09 Jul 2015 13:00:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <dan.j.williams@HIDDEN>) id 1ZDFBD-0008Mj-UZ
 for bug-parted@HIDDEN; Thu, 09 Jul 2015 13:00:16 -0400
Received: from mail-wi0-f170.google.com ([209.85.212.170]:37085)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <dan.j.williams@HIDDEN>) id 1ZDFBD-0008MN-Oq
 for bug-parted@HIDDEN; Thu, 09 Jul 2015 13:00:11 -0400
Received: by wiclp1 with SMTP id lp1so114681967wic.0
 for <bug-parted@HIDDEN>; Thu, 09 Jul 2015 10:00:10 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:date:message-id:subject:from:to
 :content-type;
 bh=5sMrZf1bB6JMPHaUq8tp3R2Y8AII+MB4LGDcQki4r9M=;
 b=k8bkKwRCkeiYH95Tx/Ay0NXenATn+U0ywFY0E07jW3BDSsYP/GnWuQXMHF3BH21R4N
 xqEg8a2bkiDBYBf/+USbEBio/yIbvrxl1W90g3qR9anFIQmBy3ceKw0VHZGw+92pTQQ+
 M7iPRCFT2ChCMtmVzTg0u9i4mRSupC3kePaksQxYPEjAc8jhjWEXj++1FLuH4iaxjekE
 ehfJVIf0ShEiYQaCWFcOd001KU/hKYg+4Pr/UZkdG8XKDPPlT79dgwHhnxWIFdPc9Nrw
 R6pr1agjB7UzJLJbaWysz4v0AHpVzwjh6iPFQjosmv3I70RyetyEDWalbVPwJU1W8Mwb
 p+pQ==
X-Gm-Message-State: ALoCoQm3lBU5RTzkONIykCuk1qCd14AO5XKF+8W/EFWqnzOqUJGJi+wboHrmCzQxT+U3aadJLym2
MIME-Version: 1.0
X-Received: by 10.180.198.52 with SMTP id iz20mr97043811wic.77.1436461210495; 
 Thu, 09 Jul 2015 10:00:10 -0700 (PDT)
Received: by 10.27.127.68 with HTTP; Thu, 9 Jul 2015 10:00:10 -0700 (PDT)
Date: Thu, 9 Jul 2015 10:00:10 -0700
Message-ID: <CAPcyv4j0cqJq_Q+7U3dSS4n9RH6rVTkFsprXu_0nfegrQgMP+Q@HIDDEN>
From: Dan Williams <dan.j.williams@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Mailman-Approved-At: Thu, 09 Jul 2015 13:04:32 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

BLK mode devices emitted by the libnvdimm sub-system [1] have a "." in
their name.  When parted calls _probe_sys_block() it trips over this
fact and unconditionally re-writes the block device name.

                /* in /sys/block, '/'s are replaced with '!' or '.' */
                for (ptr = dev_name; *ptr != '\0'; ptr++) {
                        if (*ptr == '!' || *ptr == '.')
                                *ptr = '/';
                }

This is confirmed by strace where parted emits calls to

lstat("/dev/ndblk2", 0x7ffec6b33e50)    = -1 ENOENT (No such file or directory)
stat("/dev/ndblk2/0", 0x7ffec6b33dc0)   = -1 ENOENT (No such file or directory)

The original BLK device name is /dev/ndblk2.0.

This can be reproduced with a 4.2-rc1+ kernel and the nfit_test
module.  See the libndctl readme for instructions on getting the test
environment running [2].

[1]: https://git.kernel.org/cgit/linux/kernel/git/djbw/nvdimm.git/tree/Documentation/nvdimm/nvdimm.txt?h=libnvdimm-for-next

[2]: https://github.com/pmem/ndctl




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.503 (Entity 5.503)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Dan Williams <dan.j.williams@HIDDEN>
Subject: bug#21018: Acknowledgement (Support for "libnvdimm BLK" devices)
Message-ID: <handler.21018.B.143646147530846.ack <at> debbugs.gnu.org>
References: <CAPcyv4j0cqJq_Q+7U3dSS4n9RH6rVTkFsprXu_0nfegrQgMP+Q@HIDDEN>
X-Gnu-PR-Message: ack 21018
X-Gnu-PR-Package: parted
Reply-To: 21018 <at> debbugs.gnu.org
Date: Thu, 09 Jul 2015 17:05:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-parted@HIDDEN

If you wish to submit further information on this problem, please
send it to 21018 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
21018: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D21018
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-parted@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#21018: Support for "libnvdimm BLK" devices
Resent-From: "Brian C. Lane" <bcl@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-parted@HIDDEN
Resent-Date: Thu, 09 Jul 2015 21:54:01 +0000
Resent-Message-ID: <handler.21018.B.143647879225166 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 21018
X-GNU-PR-Package: parted
X-GNU-PR-Keywords: 
To: 21018 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-parted@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.143647879225166
          (code B ref -1); Thu, 09 Jul 2015 21:54:01 +0000
Received: (at submit) by debbugs.gnu.org; 9 Jul 2015 21:53:12 +0000
Received: from localhost ([127.0.0.1]:45601 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZDJkl-0006Xq-JG
	for submit <at> debbugs.gnu.org; Thu, 09 Jul 2015 17:53:11 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36233)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <bcl@HIDDEN>) id 1ZDJki-0006XS-Fr
 for submit <at> debbugs.gnu.org; Thu, 09 Jul 2015 17:53:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <bcl@HIDDEN>) id 1ZDJkc-00035V-3x
 for submit <at> debbugs.gnu.org; Thu, 09 Jul 2015 17:53:03 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:59705)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <bcl@HIDDEN>) id 1ZDJkc-00035P-0v
 for submit <at> debbugs.gnu.org; Thu, 09 Jul 2015 17:53:02 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:49739)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <bcl@HIDDEN>) id 1ZDJka-0001Ir-LK
 for bug-parted@HIDDEN; Thu, 09 Jul 2015 17:53:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <bcl@HIDDEN>) id 1ZDJkW-00034b-Ge
 for bug-parted@HIDDEN; Thu, 09 Jul 2015 17:53:00 -0400
Received: from mx1.redhat.com ([209.132.183.28]:35137)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <bcl@HIDDEN>) id 1ZDJkW-000349-BS
 for bug-parted@HIDDEN; Thu, 09 Jul 2015 17:52:56 -0400
Received: from int-mx09.intmail.prod.int.phx2.redhat.com
 (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
 by mx1.redhat.com (Postfix) with ESMTPS id B5C744C0A1
 for <bug-parted@HIDDEN>; Thu,  9 Jul 2015 21:52:54 +0000 (UTC)
Received: from lister.brianlane.com (ovpn-113-156.phx2.redhat.com
 [10.3.113.156])
 by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
 t69Lqqlq012276
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO)
 for <bug-parted@HIDDEN>; Thu, 9 Jul 2015 17:52:54 -0400
Date: Thu, 9 Jul 2015 14:52:52 -0700
From: "Brian C. Lane" <bcl@HIDDEN>
Message-ID: <20150709215252.GD3080@HIDDEN>
References: <CAPcyv4j0cqJq_Q+7U3dSS4n9RH6rVTkFsprXu_0nfegrQgMP+Q@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAPcyv4j0cqJq_Q+7U3dSS4n9RH6rVTkFsprXu_0nfegrQgMP+Q@HIDDEN>
User-Agent: Mutt/1.5.23 (2014-03-12)
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

On Thu, Jul 09, 2015 at 10:00:10AM -0700, Dan Williams wrote:
> BLK mode devices emitted by the libnvdimm sub-system [1] have a "." in
> their name.  When parted calls _probe_sys_block() it trips over this
> fact and unconditionally re-writes the block device name.
> 
>                 /* in /sys/block, '/'s are replaced with '!' or '.' */
>                 for (ptr = dev_name; *ptr != '\0'; ptr++) {
>                         if (*ptr == '!' || *ptr == '.')
>                                 *ptr = '/';
>                 }
> 
> This is confirmed by strace where parted emits calls to
> 
> lstat("/dev/ndblk2", 0x7ffec6b33e50)    = -1 ENOENT (No such file or directory)
> stat("/dev/ndblk2/0", 0x7ffec6b33dc0)   = -1 ENOENT (No such file or directory)
> 
> The original BLK device name is /dev/ndblk2.0.
> 
> This can be reproduced with a 4.2-rc1+ kernel and the nfit_test
> module.  See the libndctl readme for instructions on getting the test
> environment running [2].
> 
> [1]: https://git.kernel.org/cgit/linux/kernel/git/djbw/nvdimm.git/tree/Documentation/nvdimm/nvdimm.txt?h=libnvdimm-for-next
> 
> [2]: https://github.com/pmem/ndctl

Thanks for the report. I think we can reduce this to just replacing '!',
as far as I can tell cciss is the only device that has subdirectories
and uses the ! in the name. Looking at the current kernel code it looks
like the substitution is done in drivers/base/core.c ->
device_get_devnode()

I'm no kernel expert though. What does everyone think about dropping the
'.'? Do you know of anything that this would break?

In blivet (our storage library which handles all the devices we've ever
seen) it only looks for ! so that's reassuring.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)




Message sent to bug-parted@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#21018: Support for "libnvdimm BLK" devices
Resent-From: Dan Williams <dan.j.williams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-parted@HIDDEN
Resent-Date: Tue, 04 Aug 2015 05:25:03 +0000
Resent-Message-ID: <handler.21018.B21018.14386658764019 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 21018
X-GNU-PR-Package: parted
X-GNU-PR-Keywords: 
To: "Brian C. Lane" <bcl@HIDDEN>
Cc: 21018 <at> debbugs.gnu.org
Received: via spool by 21018-submit <at> debbugs.gnu.org id=B21018.14386658764019
          (code B ref 21018); Tue, 04 Aug 2015 05:25:03 +0000
Received: (at 21018) by debbugs.gnu.org; 4 Aug 2015 05:24:36 +0000
Received: from localhost ([127.0.0.1]:38959 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZMUiJ-00012l-IO
	for submit <at> debbugs.gnu.org; Tue, 04 Aug 2015 01:24:36 -0400
Received: from mail-wi0-f169.google.com ([209.85.212.169]:33092)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <dan.j.williams@HIDDEN>) id 1ZMUiH-00012a-0f
 for 21018 <at> debbugs.gnu.org; Tue, 04 Aug 2015 01:24:34 -0400
Received: by wicmv11 with SMTP id mv11so160572671wic.0
 for <21018 <at> debbugs.gnu.org>; Mon, 03 Aug 2015 22:24:32 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:in-reply-to:references:date
 :message-id:subject:from:to:cc:content-type;
 bh=Nr82DDh2+NdUGlerkM+hLvkO1RA7bSyRUNikJocsN3o=;
 b=RvQ+zQ8bphh+SW/yjO3WW4750H+dQBRJYS9lcoA82JBXu3mwHn2O+ZMTtFiNVhuh3l
 IAhdScawLNUmi7rkt/+xkWEq1Ke2OH6MHMOrp8SI9N0OvrVy1+tpdToDYuE+i5uUjrA1
 qJ8k7CX49SZ9pEaKckTTMOcahrxMnH0wG6HPNd558TYKU2x0Pi+xwKQRVZiMizNImAMZ
 EjIh1iJI/mAVCAG/Jr4g+c7CjjzduUuG5TT7+qY/05S6bM9v2zdTyHhk/caIHMJYCmU1
 uEISsoNKZ9tCHDiX28A9NBry1juJBzsvWDy4sp7Ozlfascsyfjoubg+ijxDBg5+Ym2qZ
 uA3Q==
X-Gm-Message-State: ALoCoQlItbGUuiA7ypwWfSqK//3LvwxMwn8CMh5BRxIvMiUMPzPkgkQO0LffLu9wJvffpnWnyTeW
MIME-Version: 1.0
X-Received: by 10.194.90.70 with SMTP id bu6mr3847010wjb.149.1438665872415;
 Mon, 03 Aug 2015 22:24:32 -0700 (PDT)
Received: by 10.27.127.196 with HTTP; Mon, 3 Aug 2015 22:24:32 -0700 (PDT)
In-Reply-To: <20150709215252.GD3080@HIDDEN>
References: <CAPcyv4j0cqJq_Q+7U3dSS4n9RH6rVTkFsprXu_0nfegrQgMP+Q@HIDDEN>
 <20150709215252.GD3080@HIDDEN>
Date: Mon, 3 Aug 2015 22:24:32 -0700
Message-ID: <CAPcyv4g8aeNKBnDNY20rBjsUNiJL-D=YaQ2rbOpM95oBMwOOMA@HIDDEN>
From: Dan Williams <dan.j.williams@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On Thu, Jul 9, 2015 at 2:52 PM, Brian C. Lane <bcl@HIDDEN> wrote:
> On Thu, Jul 09, 2015 at 10:00:10AM -0700, Dan Williams wrote:
>> BLK mode devices emitted by the libnvdimm sub-system [1] have a "." in
>> their name.  When parted calls _probe_sys_block() it trips over this
>> fact and unconditionally re-writes the block device name.
>>
>>                 /* in /sys/block, '/'s are replaced with '!' or '.' */
>>                 for (ptr = dev_name; *ptr != '\0'; ptr++) {
>>                         if (*ptr == '!' || *ptr == '.')
>>                                 *ptr = '/';
>>                 }
>>
>> This is confirmed by strace where parted emits calls to
>>
>> lstat("/dev/ndblk2", 0x7ffec6b33e50)    = -1 ENOENT (No such file or directory)
>> stat("/dev/ndblk2/0", 0x7ffec6b33dc0)   = -1 ENOENT (No such file or directory)
>>
>> The original BLK device name is /dev/ndblk2.0.
>>
>> This can be reproduced with a 4.2-rc1+ kernel and the nfit_test
>> module.  See the libndctl readme for instructions on getting the test
>> environment running [2].
>>
>> [1]: https://git.kernel.org/cgit/linux/kernel/git/djbw/nvdimm.git/tree/Documentation/nvdimm/nvdimm.txt?h=libnvdimm-for-next
>>
>> [2]: https://github.com/pmem/ndctl
>
> Thanks for the report. I think we can reduce this to just replacing '!',
> as far as I can tell cciss is the only device that has subdirectories
> and uses the ! in the name. Looking at the current kernel code it looks
> like the substitution is done in drivers/base/core.c ->
> device_get_devnode()
>
> I'm no kernel expert though. What does everyone think about dropping the
> '.'? Do you know of anything that this would break?
>
> In blivet (our storage library which handles all the devices we've ever
> seen) it only looks for ! so that's reassuring.
>

Any update on this?

With this one line change, parted can list libnvdimm "BLK" devices:

diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 27bbb8043e4f..2719ac327236 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -2237,7 +2237,7 @@ _probe_sys_block ()
                strcat (dev_name, dirent->d_name);
                /* in /sys/block, '/'s are replaced with '!' or '.' */
                for (ptr = dev_name; *ptr != '\0'; ptr++) {
-                       if (*ptr == '!' || *ptr == '.')
+                       if (*ptr == '!')
                                *ptr = '/';
                }
                _ped_device_probe (dev_name);




Message sent to bug-parted@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#21018: Support for "libnvdimm BLK" devices
Resent-From: "Brian C. Lane" <bcl@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-parted@HIDDEN
Resent-Date: Fri, 07 Aug 2015 17:11:01 +0000
Resent-Message-ID: <handler.21018.B21018.14389674509860 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 21018
X-GNU-PR-Package: parted
X-GNU-PR-Keywords: 
To: Dan Williams <dan.j.williams@HIDDEN>
Cc: 21018 <at> debbugs.gnu.org
Received: via spool by 21018-submit <at> debbugs.gnu.org id=B21018.14389674509860
          (code B ref 21018); Fri, 07 Aug 2015 17:11:01 +0000
Received: (at 21018) by debbugs.gnu.org; 7 Aug 2015 17:10:50 +0000
Received: from localhost ([127.0.0.1]:50318 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZNlAQ-0002Yx-Dy
	for submit <at> debbugs.gnu.org; Fri, 07 Aug 2015 13:10:50 -0400
Received: from mx1.redhat.com ([209.132.183.28]:48419)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <bcl@HIDDEN>) id 1ZNlAO-0002Yp-Ce
 for 21018 <at> debbugs.gnu.org; Fri, 07 Aug 2015 13:10:49 -0400
Received: from int-mx14.intmail.prod.int.phx2.redhat.com
 (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27])
 by mx1.redhat.com (Postfix) with ESMTPS id C03DEAA0A4;
 Fri,  7 Aug 2015 17:10:47 +0000 (UTC)
Received: from lister.brianlane.com (ovpn-113-169.phx2.redhat.com
 [10.3.113.169])
 by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
 t77HAiVY028261
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);
 Fri, 7 Aug 2015 13:10:46 -0400
Date: Fri, 7 Aug 2015 10:10:44 -0700
From: "Brian C. Lane" <bcl@HIDDEN>
Message-ID: <20150807171044.GU2515@HIDDEN>
References: <CAPcyv4j0cqJq_Q+7U3dSS4n9RH6rVTkFsprXu_0nfegrQgMP+Q@HIDDEN>
 <20150709215252.GD3080@HIDDEN>
 <CAPcyv4g8aeNKBnDNY20rBjsUNiJL-D=YaQ2rbOpM95oBMwOOMA@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAPcyv4g8aeNKBnDNY20rBjsUNiJL-D=YaQ2rbOpM95oBMwOOMA@HIDDEN>
User-Agent: Mutt/1.5.23 (2014-03-12)
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27
X-Spam-Score: -5.1 (-----)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.1 (-----)

On Mon, Aug 03, 2015 at 10:24:32PM -0700, Dan Williams wrote:
> On Thu, Jul 9, 2015 at 2:52 PM, Brian C. Lane <bcl@HIDDEN> wrote:
> > On Thu, Jul 09, 2015 at 10:00:10AM -0700, Dan Williams wrote:
> >> BLK mode devices emitted by the libnvdimm sub-system [1] have a "." in
> >> their name.  When parted calls _probe_sys_block() it trips over this
> >> fact and unconditionally re-writes the block device name.
> >>
> >>                 /* in /sys/block, '/'s are replaced with '!' or '.' */
> >>                 for (ptr = dev_name; *ptr != '\0'; ptr++) {
> >>                         if (*ptr == '!' || *ptr == '.')
> >>                                 *ptr = '/';
> >>                 }
> >>
> >> This is confirmed by strace where parted emits calls to
> >>
> >> lstat("/dev/ndblk2", 0x7ffec6b33e50)    = -1 ENOENT (No such file or directory)
> >> stat("/dev/ndblk2/0", 0x7ffec6b33dc0)   = -1 ENOENT (No such file or directory)
> >>
> >> The original BLK device name is /dev/ndblk2.0.
> >>
> >> This can be reproduced with a 4.2-rc1+ kernel and the nfit_test
> >> module.  See the libndctl readme for instructions on getting the test
> >> environment running [2].
> >>
> >> [1]: https://git.kernel.org/cgit/linux/kernel/git/djbw/nvdimm.git/tree/Documentation/nvdimm/nvdimm.txt?h=libnvdimm-for-next
> >>
> >> [2]: https://github.com/pmem/ndctl
> >
> > Thanks for the report. I think we can reduce this to just replacing '!',
> > as far as I can tell cciss is the only device that has subdirectories
> > and uses the ! in the name. Looking at the current kernel code it looks
> > like the substitution is done in drivers/base/core.c ->
> > device_get_devnode()
> >
> > I'm no kernel expert though. What does everyone think about dropping the
> > '.'? Do you know of anything that this would break?
> >
> > In blivet (our storage library which handles all the devices we've ever
> > seen) it only looks for ! so that's reassuring.
> >
> 
> Any update on this?
> 
> With this one line change, parted can list libnvdimm "BLK" devices:
> 
> diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
> index 27bbb8043e4f..2719ac327236 100644
> --- a/libparted/arch/linux.c
> +++ b/libparted/arch/linux.c
> @@ -2237,7 +2237,7 @@ _probe_sys_block ()
>                 strcat (dev_name, dirent->d_name);
>                 /* in /sys/block, '/'s are replaced with '!' or '.' */
>                 for (ptr = dev_name; *ptr != '\0'; ptr++) {
> -                       if (*ptr == '!' || *ptr == '.')
> +                       if (*ptr == '!')
>                                 *ptr = '/';
>                 }
>                 _ped_device_probe (dev_name);

I think this is fine. I'll push it later today. Thanks!

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)





Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.