GNU bug report logs - #15348
[PATCH 11/19] libparted: don't canonicalize /dev/md/ paths (#872361)

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: parted; Reported by: "Brian C. Lane" <bcl@HIDDEN>; Keywords: patch; dated Wed, 11 Sep 2013 20:16:01 UTC; Maintainer for parted is bug-parted@HIDDEN.

Message received at 15348 <at> debbugs.gnu.org:


Received: (at 15348) by debbugs.gnu.org; 2 Oct 2013 19:13:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 02 15:13:30 2013
Received: from localhost ([127.0.0.1]:50099 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VRRrV-0003uG-Sb
	for submit <at> debbugs.gnu.org; Wed, 02 Oct 2013 15:13:30 -0400
Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.120]:37291)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <psusi@HIDDEN>) id 1VRRrU-0003u8-4s
 for 15348 <at> debbugs.gnu.org; Wed, 02 Oct 2013 15:13:28 -0400
X-Authority-Analysis: v=2.0 cv=VNlfbqzX c=1 sm=0 a=/DbS/tiKggfTkRRHPZEB4g==:17
 a=Qsx_du5GiBkA:10 a=sCfsyOEanakA:10 a=BuoAO2XsGXkA:10 a=S1A5HrydsesA:10
 a=8nJEP1OIZ-IA:10 a=fxJcL_dCAAAA:8 a=KGjhK52YXX0A:10 a=APNWvHywyFMA:10
 a=QfKxxUxMAAAA:8 a=VR6hftvRN7SrzN-AiTkA:9 a=wPNLvfGTeEIA:10
 a=/DbS/tiKggfTkRRHPZEB4g==:117
X-Cloudmark-Score: 0
X-Authenticated-User: 
X-Originating-IP: 67.78.168.186
Received: from [67.78.168.186] ([67.78.168.186:56149] helo=[10.1.1.236])
 by cdptpa-oedge03.mail.rr.com (envelope-from <psusi@HIDDEN>)
 (ecelerity 2.2.3.46 r()) with ESMTP
 id 48/D5-19029-7507C425; Wed, 02 Oct 2013 19:13:27 +0000
Message-ID: <524C7056.5090300@HIDDEN>
Date: Wed, 02 Oct 2013 15:13:26 -0400
From: Phillip Susi <psusi@HIDDEN>
User-Agent: Mozilla/5.0 (Windows NT 6.1;
 rv:17.0) Gecko/20130801 Thunderbird/17.0.8
MIME-Version: 1.0
To: "Brian C. Lane" <bcl@HIDDEN>
Subject: Re: bug#15348: [PATCH 11/19] libparted: don't canonicalize /dev/md/
 paths (#872361)
References: <1378927509-15215-1-git-send-email-bcl@HIDDEN>
 <1378927509-15215-12-git-send-email-bcl@HIDDEN>
 <524307C4.4000106@HIDDEN> <5248E037.4030509@HIDDEN>
 <5249D131.6000907@HIDDEN> <20131002184549.GU1931@HIDDEN>
In-Reply-To: <20131002184549.GU1931@HIDDEN>
X-Enigmail-Version: 1.5.2
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 15348
Cc: 15348 <at> debbugs.gnu.org
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: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://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: <http://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.0 (/)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/2/2013 2:45 PM, Brian C. Lane wrote:
> I think parted should always stick with the name the user gives it.
> I'm not sure what side-effects that would have so that's why I only
> changed it for /dev/md/

I kind of like the fact that it tells you what the "real" device is
when you run it on a symlink.

> I don't think looking up specific majors is useful here, the
> actual problem is that when something uses libparted (eg. anaconda)
> to open a device and then later tries to look it up by that same
> path it won't find it if the symlink is followed and the name
> changed.

I don't follow.

> Personally, I can't think of a situation where I'd ever want the
> name I give it to be changed, whether I'm using the cli or
> libparted. Maybe we should drop that whole bit and just use the
> path we're given?

Just because you have a symlink to a disk doesn't mean the partitions
will follow suit.  For instance, if you look at /dev/disk/by-id/foo,
you don't have /dev/disk/by-id/foo1.  That means that we at least
internally have to canonicalize the name to open the correct partition
node.  Would calling tools then be confused and try to look for the
partition in /dev/disk/by-id?


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSTHBWAAoJEJrBOlT6nu75554H/RWRBs2b1NCjv1e38vugEfGy
Iea6//amNYDdWd2bOcwisvZaxWm/X3o399ZORpP88WxrGtub1Pb34ynpLDDpQ5zK
8cc/NBzqJ3ho74F5vb2FyXtg4SrMrDlkC9GO7g3S7NVhKAJHxPNx6WQ4L1MACEus
b2DDx8xEplwYpgSc0FG73Gg5JTi6hF/GmT8tqufPBbQcXg/W6/9vUYclmctGrz74
XdHbGJXXB5zkvFua0J8bjVKdLckaGR/JbiKJF7eG1tpgYp1uSCHC6MgYF8EHe+kq
eiWPEkgzrlHlvYP5k51RKms386AeQLhrY2fn4eolrWLZKQJe8Si8t+AglZtXKNo=
=YeAt
-----END PGP SIGNATURE-----




Information forwarded to bug-parted@HIDDEN:
bug#15348; Package parted. Full text available.

Message received at 15348 <at> debbugs.gnu.org:


Received: (at 15348) by debbugs.gnu.org; 2 Oct 2013 18:45:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 02 14:45:55 2013
Received: from localhost ([127.0.0.1]:50059 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VRRQp-0003Hl-Hx
	for submit <at> debbugs.gnu.org; Wed, 02 Oct 2013 14:45:55 -0400
Received: from mx1.redhat.com ([209.132.183.28]:10821)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <bcl@HIDDEN>) id 1VRRQm-0003HY-1i
 for 15348 <at> debbugs.gnu.org; Wed, 02 Oct 2013 14:45:53 -0400
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
 (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
 by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r92IjpiA021863
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Wed, 2 Oct 2013 14:45:51 -0400
Received: from lister.brianlane.com (ovpn-113-50.phx2.redhat.com [10.3.113.50])
 by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
 r92Ijnqb029709
 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO);
 Wed, 2 Oct 2013 14:45:50 -0400
Date: Wed, 2 Oct 2013 11:45:49 -0700
From: "Brian C. Lane" <bcl@HIDDEN>
To: Phillip Susi <psusi@HIDDEN>
Subject: Re: bug#15348: [PATCH 11/19] libparted: don't canonicalize /dev/md/
 paths (#872361)
Message-ID: <20131002184549.GU1931@HIDDEN>
References: <1378927509-15215-1-git-send-email-bcl@HIDDEN>
 <1378927509-15215-12-git-send-email-bcl@HIDDEN>
 <524307C4.4000106@HIDDEN> <5248E037.4030509@HIDDEN>
 <5249D131.6000907@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature"; boundary="N8JPGo8/F3GjQEaQ"
Content-Disposition: inline
In-Reply-To: <5249D131.6000907@HIDDEN>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-Spam-Score: -5.7 (-----)
X-Debbugs-Envelope-To: 15348
Cc: 15348 <at> debbugs.gnu.org
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: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://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: <http://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.7 (-----)


--N8JPGo8/F3GjQEaQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Sep 30, 2013 at 03:29:53PM -0400, Phillip Susi wrote:
> Now that I look more closely at the named md situation, it seems it
> doesn't quite face the same issue as dm.  With dm, you must not
> canonicalize the name when generating the partition device name, since
> there is no /dev/dm-0p1 ( so we would fail to open the partition dev
> node ).  With md, there is a /dev/md0p1, in addition to the
> /dev/md/foo1 symlink pointing to it, so either way should work.
>=20
> I guess now the purpose of this patch is purely for the user
> experience?  If a user runs parted on /dev/md/foo then they expect
> parted to state that is what it is working on instead of /dev/md0?  Is
> the reverse true, or should parted always favor the name even if run
> on the number?  What if it is invoked on /dev/disk/by-id?

I think parted should always stick with the name the user gives it. I'm
not sure what side-effects that would have so that's why I only changed
it for /dev/md/

I don't think looking up specific majors is useful here, the actual
problem is that when something uses libparted (eg. anaconda) to open a
device and then later tries to look it up by that same path it won't
find it if the symlink is followed and the name changed.

Personally, I can't think of a situation where I'd ever want the name I
give it to be changed, whether I'm using the cli or libparted. Maybe we
should drop that whole bit and just use the path we're given?

--=20
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8=
PDT)

--N8JPGo8/F3GjQEaQ
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)

iQEVAwUBUkxp3RF+jBaO/jp/AQIbfQf7B9yR0tj1Jv0iX4ovlNxRARqUYsS5rrdx
3jIRI1iteSfMkGxKI0cFK8QnG1CJ1FJoW+3obBj5OCbzaEeMypa01aUORS1FKvql
SyTEpjAGXvtUOUJRg1jlOMdLTKT3j/nxEDKBFL2Y9EQjPgSoPkcXrTebIrTIH6A1
jyWHhKPjQ3VGJUX+EHx3P5nyBj+RrmzELYzcJvF0TIDJzbSoMxY+3RCuuBP9/tj7
V0E9X8lPr8A/S3JKKuBknkGO9WUA9drAFjLhpVaOZJAZSFWGhkASfmUWnbX/Lkbn
1uAQpXOzUZMuOkzSEwXCd+GQg9bInSH4Xcfw3dpnmR0GBTAcKM1fyQ==
=7Ywl
-----END PGP SIGNATURE-----

--N8JPGo8/F3GjQEaQ--




Information forwarded to bug-parted@HIDDEN:
bug#15348; Package parted. Full text available.

Message received at 15348 <at> debbugs.gnu.org:


Received: (at 15348) by debbugs.gnu.org; 30 Sep 2013 19:29:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 30 15:29:59 2013
Received: from localhost ([127.0.0.1]:46217 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VQjAM-0002FY-RJ
	for submit <at> debbugs.gnu.org; Mon, 30 Sep 2013 15:29:59 -0400
Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.120]:59592)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <psusi@HIDDEN>) id 1VQjAI-0002FO-Ul
 for 15348 <at> debbugs.gnu.org; Mon, 30 Sep 2013 15:29:55 -0400
X-Authority-Analysis: v=2.0 cv=DsLUCRD+ c=1 sm=0 a=/DbS/tiKggfTkRRHPZEB4g==:17
 a=Qsx_du5GiBkA:10 a=sCfsyOEanakA:10 a=BuoAO2XsGXkA:10 a=S1A5HrydsesA:10
 a=8nJEP1OIZ-IA:10 a=fxJcL_dCAAAA:8 a=KGjhK52YXX0A:10 a=APNWvHywyFMA:10
 a=QfKxxUxMAAAA:8 a=xHyFg6NvJZbux10iWYkA:9 a=wPNLvfGTeEIA:10
 a=/DbS/tiKggfTkRRHPZEB4g==:117
X-Cloudmark-Score: 0
X-Authenticated-User: 
X-Originating-IP: 67.78.168.186
Received: from [67.78.168.186] ([67.78.168.186:50257] helo=[10.1.1.236])
 by cdptpa-oedge04.mail.rr.com (envelope-from <psusi@HIDDEN>)
 (ecelerity 2.2.3.46 r()) with ESMTP
 id 23/D5-04515-131D9425; Mon, 30 Sep 2013 19:29:54 +0000
Message-ID: <5249D131.6000907@HIDDEN>
Date: Mon, 30 Sep 2013 15:29:53 -0400
From: Phillip Susi <psusi@HIDDEN>
User-Agent: Mozilla/5.0 (Windows NT 6.1;
 rv:17.0) Gecko/20130801 Thunderbird/17.0.8
MIME-Version: 1.0
To: "Brian C. Lane" <bcl@HIDDEN>
Subject: Re: bug#15348: [PATCH 11/19] libparted: don't canonicalize /dev/md/
 paths (#872361)
References: <1378927509-15215-1-git-send-email-bcl@HIDDEN>	<1378927509-15215-12-git-send-email-bcl@HIDDEN>
 <524307C4.4000106@HIDDEN> <5248E037.4030509@HIDDEN>
In-Reply-To: <5248E037.4030509@HIDDEN>
X-Enigmail-Version: 1.5.2
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Now that I look
 more closely at the named md situation, it seems it doesn't quite face the
 same issue as dm. With dm, you must not canonicalize the name when generating
 the partition device name, since there is no /dev/dm-0p1 ( so we would fail
 to open the partition dev node ). With md, there is a /dev/md0p1, in addition
 to the /dev/md/foo1 symlink pointing to it, so either way should work. [...]
 Content analysis details:   (1.2 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 1.2 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net
 [Blocked - see <http://www.spamcop.net/bl.shtml?75.180.132.120>]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
 trust [75.180.132.120 listed in list.dnswl.org]
X-Debbugs-Envelope-To: 15348
Cc: 15348 <at> debbugs.gnu.org
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: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://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: <http://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: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Now that I look
    more closely at the named md situation, it seems it doesn't quite face the
    same issue as dm. With dm, you must not canonicalize the name when generating
    the partition device name, since there is no /dev/dm-0p1 ( so we would fail
    to open the partition dev node ). With md, there is a /dev/md0p1, in addition
    to the /dev/md/foo1 symlink pointing to it, so either way should work. [...]
    
 
 Content analysis details:   (1.2 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
                             trust
                             [75.180.132.120 listed in list.dnswl.org]
  1.2 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net
               [Blocked - see <http://www.spamcop.net/bl.shtml?75.180.132.120>]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Now that I look more closely at the named md situation, it seems it
doesn't quite face the same issue as dm.  With dm, you must not
canonicalize the name when generating the partition device name, since
there is no /dev/dm-0p1 ( so we would fail to open the partition dev
node ).  With md, there is a /dev/md0p1, in addition to the
/dev/md/foo1 symlink pointing to it, so either way should work.

I guess now the purpose of this patch is purely for the user
experience?  If a user runs parted on /dev/md/foo then they expect
parted to state that is what it is working on instead of /dev/md0?  Is
the reverse true, or should parted always favor the name even if run
on the number?  What if it is invoked on /dev/disk/by-id?

On 9/29/2013 10:21 PM, Phillip Susi wrote:
> I just posted a patch refactoring the existing dm fix in the way
> that I described.  I'm not sure what ioctls are needed to retrieve
> the correct name for md devices, so I haven't tried to do that part
> yet. If you know how to do that, you should be able to see the
> direction I went with the dm devices and follow suit with md.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSSdExAAoJEJrBOlT6nu75mMAH/iXGT9r6SftVnyTgTHmi1cV2
iY+WTy/LlzPDoXz/b3NhLU/+v7HG/fYSiee3itG1Qim/YT3ytc/1xBc9EaMqhXCL
myh6bOwheMovD+TuFRySbTi7KamWFy7f9pQafmHsYN6Hiy9ueDzTL3do0SrVshU4
VmMa8hcwFAvYdmrSIwvbSLY/UUmj/7GvJ1QeE9QgVs7Flu4Zi4tmSXpEMni1Xy8f
Sm+A3bUzOhEQegiYlwyFiBqyzNQfIy6Bz2Fomnw4w7A3PICjiH9pzUP7SM3EG20R
CbPKMdYmNWaX2d9XNHQIPGC4w3xOl1D9tuvIn57lWZJ4cXDzX6T37JDVZZsvfCw=
=qM1I
-----END PGP SIGNATURE-----




Information forwarded to bug-parted@HIDDEN:
bug#15348; Package parted. Full text available.

Message received at 15348 <at> debbugs.gnu.org:


Received: (at 15348) by debbugs.gnu.org; 30 Sep 2013 02:21:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 29 22:21:48 2013
Received: from localhost ([127.0.0.1]:45350 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VQT7L-0001i4-NN
	for submit <at> debbugs.gnu.org; Sun, 29 Sep 2013 22:21:48 -0400
Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.120]:36064)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <psusi@HIDDEN>) id 1VQT7I-0001hv-Eb
 for 15348 <at> debbugs.gnu.org; Sun, 29 Sep 2013 22:21:45 -0400
X-Authority-Analysis: v=2.0 cv=VNlfbqzX c=1 sm=0 a=3SewDSjaRW4vdJyuxQ33ZQ==:17
 a=DeBnktw0k-IA:10 a=3KVzincvWKMA:10 a=BuoAO2XsGXkA:10 a=S1A5HrydsesA:10
 a=8nJEP1OIZ-IA:10 a=fxJcL_dCAAAA:8 a=KGjhK52YXX0A:10 a=APNWvHywyFMA:10
 a=QfKxxUxMAAAA:8 a=TwIqeI5tmUPMvYPlio8A:9 a=wPNLvfGTeEIA:10
 a=3SewDSjaRW4vdJyuxQ33ZQ==:117
X-Cloudmark-Score: 0
X-Authenticated-User: 
X-Originating-IP: 72.238.73.171
Received: from [72.238.73.171] ([72.238.73.171:39905] helo=[192.168.1.6])
 by cdptpa-oedge03.mail.rr.com (envelope-from <psusi@HIDDEN>)
 (ecelerity 2.2.3.46 r()) with ESMTP
 id 9E/42-19029-730E8425; Mon, 30 Sep 2013 02:21:44 +0000
Message-ID: <5248E037.4030509@HIDDEN>
Date: Sun, 29 Sep 2013 22:21:43 -0400
From: Phillip Susi <psusi@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:24.0) Gecko/20100101 Thunderbird/24.0
MIME-Version: 1.0
To: "Brian C. Lane" <bcl@HIDDEN>
Subject: Re: bug#15348: [PATCH 11/19] libparted: don't canonicalize /dev/md/
 paths (#872361)
References: <1378927509-15215-1-git-send-email-bcl@HIDDEN>	<1378927509-15215-12-git-send-email-bcl@HIDDEN>
 <524307C4.4000106@HIDDEN>
In-Reply-To: <524307C4.4000106@HIDDEN>
X-Enigmail-Version: 1.5.2
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 15348
Cc: 15348 <at> debbugs.gnu.org
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: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://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: <http://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.0 (/)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

I just posted a patch refactoring the existing dm fix in the way that
I described.  I'm not sure what ioctls are needed to retrieve the
correct name for md devices, so I haven't tried to do that part yet.
If you know how to do that, you should be able to see the direction I
went with the dm devices and follow suit with md.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCgAGBQJSSOA3AAoJEJrBOlT6nu75pHoH/REFNjKL2Z5yS4Hbk7q7+7uq
KZaxWU8lyGSjIBH6ZduePnPaaYELmJJAsBQcEuKQgpXv0GcQYkjewL3hnCtM1QZG
2VhbzMX7OoL7coPNjY6t/VzpgAGKDxqFSiDcm8gmyZxOaaD7t6je9udI0gjcwmJS
jZOXslsUH4MuVDtdL1yFMb0buvZC/CVeeH5RZ1gRFbshLT8LqCvHucJ6b3qeDUCh
hH3a4c3/T70fTG057j7QXC6oLxDK6UhJvKmxgH2QvSmSfevytl3M+AJvwDkdUGR9
MbQ1AYgFTyVxxlxcpPqjemspGtj8I70E4Z82zOJXIjgGvtjrAdIwWXQIRC6lDKg=
=3Qg7
-----END PGP SIGNATURE-----




Information forwarded to bug-parted@HIDDEN:
bug#15348; Package parted. Full text available.

Message received at 15348 <at> debbugs.gnu.org:


Received: (at 15348) by debbugs.gnu.org; 25 Sep 2013 15:56:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 25 11:56:57 2013
Received: from localhost ([127.0.0.1]:35483 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VOrSS-0003QU-CH
	for submit <at> debbugs.gnu.org; Wed, 25 Sep 2013 11:56:56 -0400
Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.120]:54923)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <psusi@HIDDEN>) id 1VOrSP-0003QK-NC
 for 15348 <at> debbugs.gnu.org; Wed, 25 Sep 2013 11:56:54 -0400
X-Authority-Analysis: v=2.0 cv=J9QoHXbS c=1 sm=0 a=/DbS/tiKggfTkRRHPZEB4g==:17
 a=Qsx_du5GiBkA:10 a=sCfsyOEanakA:10 a=BuoAO2XsGXkA:10 a=S1A5HrydsesA:10
 a=8nJEP1OIZ-IA:10 a=fxJcL_dCAAAA:8 a=KGjhK52YXX0A:10 a=APNWvHywyFMA:10
 a=20KFwNOVAAAA:8 a=QfKxxUxMAAAA:8 a=6YfYBWrSghingTIgmn8A:9 a=wPNLvfGTeEIA:10
 a=jEp0ucaQiEUA:10 a=/DbS/tiKggfTkRRHPZEB4g==:117
X-Cloudmark-Score: 0
X-Authenticated-User: 
X-Originating-IP: 67.78.168.186
Received: from [67.78.168.186] ([67.78.168.186:55160] helo=[10.1.1.236])
 by cdptpa-oedge01.mail.rr.com (envelope-from <psusi@HIDDEN>)
 (ecelerity 2.2.3.46 r()) with ESMTP
 id 2B/A9-00725-4C703425; Wed, 25 Sep 2013 15:56:53 +0000
Message-ID: <524307C4.4000106@HIDDEN>
Date: Wed, 25 Sep 2013 11:56:52 -0400
From: Phillip Susi <psusi@HIDDEN>
User-Agent: Mozilla/5.0 (Windows NT 6.1;
 rv:17.0) Gecko/20130801 Thunderbird/17.0.8
MIME-Version: 1.0
To: "Brian C. Lane" <bcl@HIDDEN>
Subject: Re: bug#15348: [PATCH 11/19] libparted: don't canonicalize /dev/md/
 paths (#872361)
References: <1378927509-15215-1-git-send-email-bcl@HIDDEN>
 <1378927509-15215-12-git-send-email-bcl@HIDDEN>
In-Reply-To: <1378927509-15215-12-git-send-email-bcl@HIDDEN>
X-Enigmail-Version: 1.5.2
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 15348
Cc: 15348 <at> debbugs.gnu.org
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: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://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: <http://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.0 (/)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I still think this section of code is wrong for two reasons:

1)  It should not skip canonicalization, but rather do it correctly
2)  It should not be based on the path given, but on the dev_t

Examples:

parted /dev/disk/by-id/xxxxx print
parted /dev/vg/lv print

Because the string does not start with /dev/mapper, it is
canonicalized to /dev/dm-x.  Instead it should notice the dev_t major
is device mapper, and use the dm api to read the name and append it to
"/dev/mapper" for the official name.

On 9/11/2013 3:25 PM, Brian C. Lane wrote:
> From: "Brian C. Lane" <bcl@HIDDEN>
> 
> This is the same issue we have with /dev/mapper/ paths that was
> fixed in commit c1eb485b9fd8919e18f192d678bc52b0488e6ee0. When
> libparted is used to setup the device the symlink should be used to
> reference it, not the backing device name which could change.
> 
> * libparted/device.c (ped_device_get): Don't canonicalize names 
> that start with "/dev/md/". --- libparted/device.c | 7 +++++-- 1
> file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/libparted/device.c b/libparted/device.c index
> 738b320..cdcc117 100644 --- a/libparted/device.c +++
> b/libparted/device.c @@ -152,8 +152,11 @@ ped_device_get (const
> char* path) char*		normal_path = NULL;
> 
> PED_ASSERT (path != NULL); -	/* Don't canonicalize /dev/mapper
> paths, see tests/symlink.c */ -	if (strncmp (path, "/dev/mapper/",
> 12)) +	/* Don't canonicalize /dev/mapper or /dev/md/ paths, see +
> tests/symlink.c +	*/ +	if (strncmp (path, "/dev/mapper/", 12) && +
> strncmp (path, "/dev/md/", 8)) normal_path = canonicalize_file_name
> (path); if (!normal_path) /* Well, maybe it is just that the file
> does not exist.
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSQwfEAAoJEJrBOlT6nu75U4oIANFSZR6fU0vKIYLp/GIGjVOM
aqaPoBFpzWMfXoP4niJaKLm22Q0t50ckjl6Mv9iwoZbI2xHj0vaFCDwEttw6wCYZ
hLt6JLFmA3sZE8psSm9VeflCCgEIKVtOS4pq0S13eWcZhlW6JgMpbidHVg2Fvjkw
eBK2MUY0nga22J1B8Ib84ugv/RImatg/x2w1+xwfihon83MnKz5v9ZwybQ/bUHhc
Bm1xAbtihdfLUzSFoblAhQqdBdUnoUmlOaLsHch2ZY+/4cEu1H76WiHdLUcO6GZV
MjMh9UPZGVSvCmMtUgL7SmbAdsVy5EcaYTfzDPI/k9I5LaBsw2tRl97vUoEfMzc=
=b+wC
-----END PGP SIGNATURE-----




Information forwarded to bug-parted@HIDDEN:
bug#15348; Package parted. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 11 Sep 2013 20:15:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 11 16:15:09 2013
Received: from localhost ([127.0.0.1]:56488 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VJqof-0004GA-Lk
	for submit <at> debbugs.gnu.org; Wed, 11 Sep 2013 16:15:09 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45339)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <bcl@HIDDEN>) id 1VJqoe-0004F6-Ex
 for submit <at> debbugs.gnu.org; Wed, 11 Sep 2013 16:15:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <bcl@HIDDEN>) id 1VJqoQ-00018d-U5
 for submit <at> debbugs.gnu.org; Wed, 11 Sep 2013 16:15: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.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:45183)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <bcl@HIDDEN>) id 1VJqoQ-00018Q-Qq
 for submit <at> debbugs.gnu.org; Wed, 11 Sep 2013 16:14:54 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:46984)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <bcl@HIDDEN>) id 1VJqoK-0002KD-QL
 for bug-parted@HIDDEN; Wed, 11 Sep 2013 16:14:54 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <bcl@HIDDEN>) id 1VJqoE-00016y-Pk
 for bug-parted@HIDDEN; Wed, 11 Sep 2013 16:14:48 -0400
Received: from neil.brianlane.com ([24.113.37.65]:44100
 helo=lister.brianlane.com) by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <bcl@HIDDEN>) id 1VJqoE-0000sS-DH
 for bug-parted@HIDDEN; Wed, 11 Sep 2013 16:14:42 -0400
Received: from lister.brianlane.com (localhost [127.0.0.1])
 by lister.brianlane.com (8.14.7/8.14.7) with ESMTP id r8BJPI5Y015318
 for <bug-parted@HIDDEN>; Wed, 11 Sep 2013 12:25:18 -0700
Received: (from bcl@localhost)
 by lister.brianlane.com (8.14.7/8.14.7/Submit) id r8BJPI9J015317
 for bug-parted@HIDDEN; Wed, 11 Sep 2013 12:25:18 -0700
From: "Brian C. Lane" <bcl@HIDDEN>
To: bug-parted@HIDDEN
Subject: [PATCH 11/19] libparted: don't canonicalize /dev/md/ paths (#872361)
Date: Wed, 11 Sep 2013 12:25:01 -0700
Message-Id: <1378927509-15215-12-git-send-email-bcl@HIDDEN>
X-Mailer: git-send-email 1.8.3.1
In-Reply-To: <1378927509-15215-1-git-send-email-bcl@HIDDEN>
References: <1378927509-15215-1-git-send-email-bcl@HIDDEN>
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-Debbugs-Envelope-To: submit
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: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://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: <http://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 (-----)

From: "Brian C. Lane" <bcl@HIDDEN>

This is the same issue we have with /dev/mapper/ paths that was fixed in
commit c1eb485b9fd8919e18f192d678bc52b0488e6ee0. When libparted
is used to setup the device the symlink should be used to reference it,
not the backing device name which could change.

* libparted/device.c (ped_device_get): Don't canonicalize names
  that start with "/dev/md/".
---
 libparted/device.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libparted/device.c b/libparted/device.c
index 738b320..cdcc117 100644
--- a/libparted/device.c
+++ b/libparted/device.c
@@ -152,8 +152,11 @@ ped_device_get (const char* path)
 	char*		normal_path = NULL;
 
 	PED_ASSERT (path != NULL);
-	/* Don't canonicalize /dev/mapper paths, see tests/symlink.c */
-	if (strncmp (path, "/dev/mapper/", 12))
+	/* Don't canonicalize /dev/mapper or /dev/md/ paths, see
+	   tests/symlink.c
+	*/
+	if (strncmp (path, "/dev/mapper/", 12) &&
+	    strncmp (path, "/dev/md/", 8))
 		normal_path = canonicalize_file_name (path);
 	if (!normal_path)
 		/* Well, maybe it is just that the file does not exist.
-- 
1.8.3.1





Acknowledgement sent to "Brian C. Lane" <bcl@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-parted@HIDDEN. Full text available.
Report forwarded to bug-parted@HIDDEN:
bug#15348; Package parted. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

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