All of lore.kernel.org
 help / color / mirror / Atom feed
* Uh, 1COW?... what happens when someone does this...
@ 2014-10-22 19:41 Robert White
  2014-10-22 19:54 ` Hugo Mills
  2014-10-23  4:09 ` Duncan
  0 siblings, 2 replies; 3+ messages in thread
From: Robert White @ 2014-10-22 19:41 UTC (permalink / raw)
  To: Btrfs BTRFS

So I've been considering some NOCOW files (for VM disk images), but some 
questions arose. IS there a "1COW" (copy on write only once) flag or are 
the following operations dangerous or undefined?

(1) The page https://btrfs.wiki.kernel.org/index.php/FAQ (section "Can 
copy-on-write be turned off for data blocks?") says "COW may still 
happen if a snapshot is taken." Is that a "may" or a "will", e.g. if I 
take a snapshot and then start the VM will the file in the snapshot 
still be frozen or will it update as I alter the VM? Does the 
read-only-or-not status of the snapshot matter in this outcome?

e.g. what does "may" mean in that section?

(2) If you copy a file using "cp --reflink" and the destination is in a 
directory marked NOCOW, what happens? How about when the resultant file 
is modified in place?

(3) when using a watever.qcow2 virtual machine image that does 
copy-on-write in the VM (such as QEMU) is it better, worse, or a no-op 
to have the NOCOW flag set on the file? All the advice on this matter I 
can find in Google seems to be "VM images bad, but will be addressed 
soon" and its old enough that I don't know if "soon" has come to pass.

It seems like there is a 1COW flag implicit somewhere.

Just curious.

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

end of thread, other threads:[~2014-10-23  4:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-22 19:41 Uh, 1COW?... what happens when someone does this Robert White
2014-10-22 19:54 ` Hugo Mills
2014-10-23  4:09 ` Duncan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.