All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert White <rwhite@pobox.com>
To: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Uh, 1COW?... what happens when someone does this...
Date: Wed, 22 Oct 2014 12:41:10 -0700	[thread overview]
Message-ID: <54480856.9020604@pobox.com> (raw)

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.

             reply	other threads:[~2014-10-22 19:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-22 19:41 Robert White [this message]
2014-10-22 19:54 ` Uh, 1COW?... what happens when someone does this Hugo Mills
2014-10-23  4:09 ` Duncan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54480856.9020604@pobox.com \
    --to=rwhite@pobox.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.