From: Karel Zak <kzak@redhat.com>
To: Theodore Tso <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org, Eric Sandeen <sandeen@redhat.com>
Subject: Re: [PATCH] blkid: use /dev/mapper/<name> rather than /dev/dm-<N>
Date: Tue, 5 May 2009 21:54:23 +0200 [thread overview]
Message-ID: <20090505195423.GB4460@nb.net.home> (raw)
In-Reply-To: <20090503020528.GA25826@mit.edu>
On Sat, May 02, 2009 at 10:05:28PM -0400, Theodore Tso wrote:
> On Mon, Apr 27, 2009 at 03:00:57PM +0200, Karel Zak wrote:
> > The libblkid (since v1.41.1) returns private device-mapper names (e.g.
> > /dev/dm-0). It's because the probe_one() function scans /dev before
> > /dev/mapper.
>
> Checked in, thanks. Debian-derived distributions don't create
> /dev/dm-X names, which is why I didn't notice this issue. However,
> because of this, I modified your patch to keep this chunk which you removed:
You needn't this chunk.
> > - /* Do a short-cut scan of /dev/mapper first */
> > - if (!devname)
> > - blkid__scan_dir("/dev/mapper", devno, 0, &devname);
>
> For distributions that don't create /dev/dm-X devices, your check
I guess that all distributions have "dm-X" names in /proc/partitions, it
means my check
if (!strncmp(ptname, "dm-", 3) && isdigit(ptname[3]))
blkid__scan_dir("/dev/mapper", devno, 0, &devname);
works everywhere and you needn't to check /dev before /dev/mapper for
dm-X ptnames.
> above won't find the device name, so after searching /dev, we need to
> do a short-cut scan of /dev/mapper before we do a full brute force
> search via blkid_devno_to_devname.
Karel
--
Karel Zak <kzak@redhat.com>
prev parent reply other threads:[~2009-05-05 19:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-27 13:00 [PATCH] blkid: use /dev/mapper/<name> rather than /dev/dm-<N> Karel Zak
2009-04-27 13:00 ` [PATCH] blkid: use /sys/block/dm-<N>/dm/name Karel Zak
2009-05-03 2:41 ` Theodore Tso
2009-05-03 2:05 ` [PATCH] blkid: use /dev/mapper/<name> rather than /dev/dm-<N> Theodore Tso
2009-05-05 19:54 ` Karel Zak [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090505195423.GB4460@nb.net.home \
--to=kzak@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).