]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuDomainBlockCopy: Check @granularity to be a power of two
authorLuyao Huang <lhuang@redhat.com>
Fri, 27 Mar 2015 09:56:30 +0000 (17:56 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 2 Apr 2015 09:12:01 +0000 (11:12 +0200)
commit20aca080f37b9f4ca23df8d210400a1f05390c86
tree0195734b0378ff5e3864b163427fa396e99591ad
parent184a927a0a5d03ac8c73470533b595112051a100
qemuDomainBlockCopy: Check @granularity to be a power of two

https://bugzilla.redhat.com/show_bug.cgi?id=1206479

As described in virDomainBlockCopy() parameters description, the
VIR_DOMAIN_BLOCK_COPY_GRANULARITY parameter may require the value to
have some specific attributes (e.g. be a power of two or fall within a
certain range). And in qemu, a power of two is required. However, our
code does not check that and let qemu operation fail. Moreover, the
virsh man page is not as exact as it could be in this respect.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_driver.c
tools/virsh.pod