On Thursday 29 of March 2012 09:24:44 Liu Bo wrote: > On 03/29/2012 12:54 AM, Goffredo Baroncelli wrote: > > Could you elaborate which would be the issue ? > > "cp --reflink"-ing a file is not different than snapshotting a file. In > > any case I could mount a snapshot and not the source subvolume. > > We already have a debate about this "cross-link device": > http://comments.gmane.org/gmane.comp.file-systems.btrfs/9864 > > "cp --reflink" will use clone feature, which can share data among files, but > metadata is preserved individually. > > My case is that I can mount both a subvolume and a snapshot via "-o > subvol=xxx" or "-o subvolid=xxx". And how is this different from regular snapshot of subvolume? In the end you get two files pointing to same data on the disk while having different metadata. Let me rephrase it: People don't want to be able to do: mount /dev/lvm/btrfs /mnt/a -t btrfs -o subvol=volA mount /dev/lvm/btrfs /mnt/b -t btrfs -o subvol=volB cp --reflink=always /mnt/a/file /mnt/b Just like you can't do hardlinks over `mount --bind` mountpoints, you shouldn't be able to cp reflink over mountpoints. That's expected as this *does* break VFS semantics. *But* people want to be able to do this: mount /dev/lvm/btrfs /mnt/ -t btrfs btrfs subvol create /mnt/subvol big-file-creator > /mnt/subvol/BIG-file btrfs subvol snapshot /mnt/subvol /mnt/subvol-bak big-file-editor /mnt/subvol/BIG-file rm /mnt/subvol-bak/BIG-file cp --reflink=always /mnt/subvol/BIG-file /mnt/subvol-bak/BIG-file This does not cross any VFS boundaries. Regards, -- Hubert Kario QBS - Quality Business Software 02-656 Warszawa, ul. Ksawerów 30/85 tel. +48 (22) 646-61-51, 646-74-24 www.qbs.com.pl -- 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
