On 08/01/2014 05:49 PM, Max Reitz wrote: > Depending on the changed options and the image format, > bdrv_amend_options() may take a significant amount of time. In these > cases, a way to be informed about the operation's status is desirable. > > Since the operation is rather complex and may fundamentally change the > image, implementing it as AIO or a couroutine does not seem feasible. On
s/couroutine/coroutine/ > the other hand, implementing it as a block job would be significantly > more difficult than a simple callback and would not add benefits other > than progress report to the amending operation, because it should not > actually be run as a block job at all. > > A callback may not be very pretty, but it's very easy to implement and > perfectly fits its purpose here. > > Signed-off-by: Max Reitz <mre...@redhat.com> > --- > block.c | 5 +++-- > block/qcow2.c | 3 ++- > include/block/block.h | 8 +++++++- > include/block/block_int.h | 3 ++- > qemu-img.c | 2 +- > 5 files changed, 15 insertions(+), 6 deletions(-) Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature