Re: Device names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux