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: Tue, 19 Jun 2012 19:51:29 -0400 [thread overview]
Message-ID: <20120619235129.GB4102@shiny> (raw)
In-Reply-To: <4FDFC807.2080209@zytor.com>
On Mon, Jun 18, 2012 at 06:29:59PM -0600, H. Peter Anvin wrote:
> I just found out that all the device handling in btrfs is based on
> pathnames, but shorter pathnames (1024) that PATH_MAX (4096).
>
> This is confusing, and concerning for multiple reasons:
>
> 1. pathnames are namespace-specific; what is a pathname in one namespace
> might not be in another.
> 2. different truncation rules in the rest of the kernel.
>
> There seem to be no way one can do the equivalent of BTRFS_IOC_DEV_INFO
> but actually get a device number or other stable information for that
> device (that could be compared to a file descriptor for verification);
> is that an accurate observation?
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.
-chris
next prev parent reply other threads:[~2012-06-19 23:51 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 [this message]
2012-06-20 0:00 ` H. Peter Anvin
2012-06-20 13:37 ` Chris Mason
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=20120619235129.GB4102@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).