linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@fusionio.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: Device names
Date: Wed, 20 Jun 2012 09:37:54 -0400	[thread overview]
Message-ID: <20120620133754.GE4102@shiny> (raw)
In-Reply-To: <4FE1128B.5080004@zytor.com>

On Tue, Jun 19, 2012 at 06:00:11PM -0600, H. Peter Anvin wrote:
> On 06/19/2012 04:51 PM, Chris Mason wrote:
> > 
> > At mount time, we go through and verify the path names still belong to
> > the filesystem you thought they belonged to.  The bdev is locked during
> > the verification, so it won't be able to go away or change.
> > 
> > This is a long way of saying right we don't spit out device numbers.
> > Even device numbers can change.  We can easily add a uuid based listing,
> > which I think is what you want.
> > 
> 
> No, I want to find the actual devices.  I know I can get the UUID, but
> scanning all the block devices in the system looking for that UUID is a
> nonstarter.
> 
> Device path names can change while the system is operating (and, worse,
> are dependent on namespace changes and chroot); device *numbers* cannot
> as long as the device is in use (e.g. mounted.)  They can indeed change
> while not in use, of course.

Ok, my two choices for exporting this to you are a /sys/btrfs kind of
directory (representing the mounted filesystems) or an ioctl.  Which one
is most usable for you?

You want to map from /some_dir to a definitive list of devices you need
to find in syslinux to later boot off that FS, right?

-chris

  reply	other threads:[~2012-06-20 13:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-19  0:29 Device names H. Peter Anvin
2012-06-19 23:51 ` Chris Mason
2012-06-20  0:00   ` H. Peter Anvin
2012-06-20 13:37     ` Chris Mason [this message]
2012-06-20 17:06       ` Goffredo Baroncelli

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=20120620133754.GE4102@shiny \
    --to=chris.mason@fusionio.com \
    --cc=hpa@zytor.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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).