Thread (5 messages) 5 messages, 3 authors, 2012-06-20

Re: Device names

From: Chris Mason <hidden>
Date: 2012-06-19 23:51:32

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help