]> git.ipfire.org Git - thirdparty/libvirt.git/commit
blockjob: allow for existing files in block-copy
authorEric Blake <eblake@redhat.com>
Sat, 27 Oct 2012 13:30:30 +0000 (07:30 -0600)
committerEric Blake <eblake@redhat.com>
Sat, 27 Oct 2012 13:43:39 +0000 (07:43 -0600)
commit8ee5073c1ec59550e808904e3af3cf4018c59066
treee88431f661d446e9680514bdc37fbcd1fe4c414f
parentc1eb38053d616d764c0c5381301b4cd5d2c45921
blockjob: allow for existing files in block-copy

Support the REUSE_EXT flag, in part by copying sanity checks from
snapshot code.  This code introduces a case of probing an external
file for its type; such an action would be a security risk if the
existing file is supposed to be raw but the contents resemble some
other format; however, since the virDomainBlockRebase API has a
flag to force treating the file as raw rather than probe, we can
assume that probing is safe in all other instances.  Besides, if
we don't probe or force raw, then qemu will.

* src/qemu/qemu_driver.c (qemuDomainBlockRebase): Allow REUSE_EXT
flag.
(qemuDomainBlockCopy): Wire up flag, and add some sanity checks.
src/qemu/qemu_driver.c