]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage: Fix volume cloning for logical volume.
authorAtsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Thu, 4 Apr 2013 05:15:06 +0000 (14:15 +0900)
committerEric Blake <eblake@redhat.com>
Tue, 9 Apr 2013 19:57:26 +0000 (13:57 -0600)
commit7156c8c7846750c1eb2c1e643288483199ecc23c
treeef2aac09e7df0446094c30da2d98a378fcbb7f10
parentd990d6aeb38095b68dae0c0633d00d7e6c81051e
storage: Fix volume cloning for logical volume.

When creating a logical volume with virStorageVolCreateXMLFrom,
"qemu-img convert" is called internally if clonevol is a file volume.
Then, vol->target.format is used as output_fmt parameter but the
target.format of logical volumes is always 0 because logical volumes
haven't the volume format type element.

Fortunately, 0 was treated as RAW file format before commit f772b3d9,
so there was no problem. But now, 0 is treated as the type of none,
qemu-img fails with "Unknown file format 'none'".

This patch fixes this issue by treating output block devices as RAW
file format like for input block devices.

Signed-off-by: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
(cherry picked from commit d369e50825b88251d13a489efa2a58919b18a2c2)
src/storage/storage_backend.c