[libvirt] [PATCHv9 6/9] blockjob: implement block copy for qemu

Peter Krempa pkrempa at redhat.com
Fri Oct 26 13:21:34 UTC 2012


On 10/23/12 04:10, Eric Blake wrote:
> Minimal patch to wire up all the pieces in the previous patches
> to actually enable a block copy job.  By minimal, I mean that
> qemu creates the file (that is, no REUSE_EXT flag support yet),
> SELinux must be disabled, a lock manager is not informed, and the
> audit logs aren't updated.  But those will be added as
> improvements in future patches.
>
> This patch is designed so that if we ever add a future API
> virDomainBlockCopy with more bells and whistles (such as letting
> the user specify a destination image format different than the
> source), where virDomainBlockRebase is a wrapper around the
> simpler portions of the new functionality, then the new API can
> just reuse the new qemuDomainBlockCopy function and already
> support _SHALLOW and _REUSE_EXT flags.  Also note that libvirt.c
> already filtered the new flags if _COPY is not present, so that
> we are not impacting the case of BlockRebase being a wrapper
> around BlockPull.
>
> * src/qemu/qemu_driver.c (qemuDomainBlockCopy): New function.
> (qemuDomainBlockRebase): Call it when appropriate.
> ---
>
> v9: fix bug with driver locking
>

ACK as-is, but some parts will need to be dropped without the RHEL support.

Peter




More information about the libvir-list mailing list