From: John Dulaney <jdulaney@redhat.com>
To: linux-btrfs@vger.kernel.org
Subject: Fwd: [virt-devel] btrfs NOCOW for VM disk images
Date: Fri, 22 Nov 2013 11:17:34 -0500 (EST) [thread overview]
Message-ID: <1616992290.20969836.1385137054390.JavaMail.root@redhat.com> (raw)
In-Reply-To: <20131122142051.GA32192@stefanha-thinkpad.redhat.com>
----- Forwarded Message -----
From: "Stefan Hajnoczi" <stefanha@redhat.com>
To: "Eric Sandeen" <sandeen@redhat.com>
Cc: virt-devel@redhat.com, "Kevin Wolf" <kwolf@redhat.com>
Sent: Friday, November 22, 2013 9:20:51 AM
Subject: [virt-devel] btrfs NOCOW for VM disk images
Hi,
In upstream QEMU we're discussing patches that set the NOCOW flag on
disk image files. We're told that this increases btrfs performance
greatly since the file system will modify data in-place like ext4/xfs.
During testing I found that the NOCOW flag prevents file cloning from
working. cp --reflink fails with EINVAL when the source file has the
NOCOW flag set.
It is not possible to toggle NOCOW back and forth later on since it can
only be set when no data has been allocated for the file yet.
This leaves us with the choice between performance (NOCOW) and snapshots
(default). Both are important for VM disk images!
Questions:
* Would it be possible to extend btrfs so that cp --reflink works on
NOCOW files? (Clueless idea: quiesce I/O to the NOCOW file and clone
it, then resume I/O and COW only writes to shared blocks.)
* Does NOCOW prevent any other functionality besides file-level cloning?
* Does NOCOW increase risk of data loss/corruption? (I guess yes since
overwriting in place puts data at risk of power failure or drive
failure.)
Thanks,
Stefan
--
John Dulaney, RHCE
IRC: handsome_pirate
jdulaney.wordpress.com
next parent reply other threads:[~2013-11-22 16:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20131122142051.GA32192@stefanha-thinkpad.redhat.com>
2013-11-22 16:17 ` John Dulaney [this message]
2013-11-22 21:26 ` Fwd: [virt-devel] btrfs NOCOW for VM disk images Duncan
2013-11-22 22:00 ` Roman Mamedov
2013-11-23 1:21 ` David Sterba
2013-11-22 22:12 ` Chris Murphy
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=1616992290.20969836.1385137054390.JavaMail.root@redhat.com \
--to=jdulaney@redhat.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 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).