Re: What to do about subvolumes?

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

 



On Wed, Dec 01, 2010 at 03:09:52PM -0500, Josef Bacik wrote:
On Wed, Dec 01, 2010 at 03:00:08PM -0500, J. Bruce Fields wrote:
I think you're already fine:

	# mkdir TMP
	# dd if=/dev/zero of=TMP-image bs=1M count=512
	# mkfs.btrfs TMP-image
	# mount -oloop TMP-image TMP/
	# btrfs subvolume create sub-a
	# btrfs subvolume create sub-b
	../readdir-inos .
	. 256 256
	.. 256 4130609
	sub-a 256 256
	sub-b 257 256

Where readdir-inos is my silly test program below, and the first number is from readdir, the second from stat.


Heh as soon as I typed my email I went and actually looked at the code, looks like for readdir we fill in the root id, which will be unique, so hotdamn we are good and I don't have to use a stupid incompat flag. Thanks for checking that :),

Except, aren't the inode numbers within a filesystem and the sunbvolume tree IDs allocated out of separate namespaces? I don't think there's anything preventing a file/directory from having an inode number that clashes with one of the snapshots.

In fact, this already happens in the example above: "." (inode 256 in the root subvolume) and "sub-a" (subvolume ID 256).

(Though I still don't understand the semantics well enough to say whether we need all the inode numbers returned by readdir to be distinct.)

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


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux