public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* metadata copied/data not copied?
@ 2009-03-16 14:35 CSights
  2009-03-16 15:28 ` jim owens
  2009-03-16 21:14 ` Dmitri Nikulin
  0 siblings, 2 replies; 9+ messages in thread
From: CSights @ 2009-03-16 14:35 UTC (permalink / raw)
  To: linux-btrfs

Hi everyone,
	I'm curious what would happen in btrfs if the following commands were issued:

# cp file1 file2
# chown newuser:newgroup file2

Where file1 was owned by olduser:oldgroup.


	If I understand copy-on-write correctly the "cp" would merely create a new 
pointer (or whatever it is called :( ) containing the files' metadata but the 
file contents would not actually be duplicated.
	Then the "chown" would change the metadata so that file2's metadata indicates 
newuser:newgroup owned the file contents.  At the same time the metadata of 
file1 would say that olduser:oldgroup owned the file contents.
	
	(If a user modified the file contents, the contents would be copied at that 
time.)

Thanks, curious newbie,
	C.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-03-17 17:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-16 14:35 metadata copied/data not copied? CSights
2009-03-16 15:28 ` jim owens
2009-03-17  0:25   ` Chris Mason
2009-03-17 15:34     ` CSights
2009-03-17 15:56       ` Chris Mason
2009-03-17 17:08         ` CSights
2009-03-17 17:24           ` Chris Mason
2009-03-16 21:14 ` Dmitri Nikulin
2009-03-16 21:18   ` Dmitri Nikulin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox