[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] RFC (V2) New virDomainBlockPull API family to libvirt



On Thu, Jul 21, 2011 at 01:55:04PM -0500, Adam Litke wrote:
> Here are the patches to implement the BlockPull/BlockJob API as discussed and
> agreed to.  I am testing with a python script (included for completeness as the
> final patch).  The qemu monitor interface is not expected to change in the
> future.  Stefan is planning to submit placeholder commands for upstream qemu
> until the generic streaming support is implemented.
> 
> Changes since V1:
>  - Make virDomainBlockPullAbort() and virDomainGetBlockPullInfo() into a
>    generic BlockJob interface.
>  - Added virDomainBlockJobSetSpeed()
>  - Rename VIR_DOMAIN_EVENT_ID_BLOCK_PULL event to fit into block job API
>  - Add bandwidth argument to virDomainBlockPull()
> 
> Summary of changes since first generation patch series:
>  - Qemu dropped incremental streaming so remove libvirt incremental
>    BlockPull() API
>  - Rename virDomainBlockPullAll() to virDomainBlockPull()
>  - Changes required to qemu monitor handlers for changed command names
> 
> --
> 
> To help speed the provisioning process for large domains, new QED disks are
> created with backing to a template image.  These disks are configured with 
> copy on read such that blocks that are read from the backing file are copied
> to the new disk.  This reduces I/O over a potentially costly path to the
> backing image.
> 
> In such a configuration, there is a desire to remove the dependency on the
> backing image as the domain runs.  To accomplish this, qemu will provide an
> interface to perform sequential copy on read operations during normal VM
> operation.  Once all data has been copied, the disk image's link to the 
> backing file is removed.
> 
> The virDomainBlockPull API family brings this functionality to libvirt.
> 
> virDomainBlockPull() instructs the hypervisor to stream the entire device in
> the background.  Progress of this operation can be checked with the function
> virDomainBlockJobInfo().  An ongoing stream can be cancelled with
> virDomainBlockJobAbort().  virDomainBlockJobSetSpeed() allows you to limit the
> bandwidth that the operation may consume. 
> 
> An event (VIR_DOMAIN_EVENT_ID_BLOCK_JOB) will be emitted when a disk has been
> fully populated or if a BlockPull() operation was terminated due to an error.
> This event is useful to avoid polling on virDomainBlockJobInfo() for
> completion and could also be used by the security driver to revoke access to
> the backing file when it is no longer needed.

  Thanks Adam for that revised patch set.

    ACK

It all looked good to me, based on previous review and a last look.
I just had to fix a few merge conflicts due to new entry points being
added in the meantime and one commit message, but basically it was clean :-)

  So I pushed the set except 8 of course. I'm not sure if we should try
to store it in the example, or on the wiki. The Wiki might be a bit more
logical because I'm not sure we can run the test as is now in all
setups.


  I think the remaining item would be to add documentation about how to
use this, the paragraphs above should probably land somewhere on the web
site, ideally on the development guide
  http://libvirt.org/devguide.html
but I'm open to suggestions :-)

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]