CSights wrote:
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.

NO.  The concept you describe requires "deduplicate".

What you are forgetting is that "cp" is a user-space program that
reads data and writes it to a new file.  The kernel does not see
this as a Copy.

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

Reply via email to