linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* R: Re: Create subvolume from a directory?
@ 2012-03-29 11:30 Goffredo Baroncelli <kreijack@libero.it>
  0 siblings, 0 replies; only message in thread
From: Goffredo Baroncelli <kreijack@libero.it> @ 2012-03-29 11:30 UTC (permalink / raw)
  To: liubo2009, kreijack; +Cc: Matthias G. Eckermann, Alex, linux-btrfs

Hi Liubo

>----Messaggio originale----
>Da: liubo2009@cn.fujitsu.com
>Data: 29/03/2012 3.24

>> 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

I read the thread, but I didn't find any explanation for which it should be 
dangerous allowing a cross-link device cp--reflink. Christoph Hellwig only 
asked to explain the "btrfs subvolume semantics" to the fsdevel mailing list, 
in order to find "possible" conflict with the standard unix semantics. But 
because the Inode are different from source and dest I cannot see any problem 
(may be I am wrong, but please explain why).

The only fact that should be pointed out is that cross-link device is not 
possible in the general case; btrfs would be an exception. But I think that 
there are very good reasons to allow the btrfs-exception. But, I repeat, I 
didn't find any good reason to do not allow it. 

>"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".

This should not be a problem. My usual setup is to mount a subvolume as root, 
and the real btrfs root inside a subdirectory to allow operation between 
subvolume (like snapshot and/or cp --reflink). Of course if I don't mount the 
btrfs root, I could not perform snapshot and/or cp --reflink.

>thanks,
>liubo
Ciao
Goffredo


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-03-29 11:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-29 11:30 R: Re: Create subvolume from a directory? Goffredo Baroncelli <kreijack@libero.it>

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).