On 13.03.2012 15:48, Daniel P. Berrange wrote:
On Tue, Mar 13, 2012 at 03:35:29PM +0100, Michal Privoznik wrote:
> This API can be used to terminate long running jobs
> on a volume like its building, resizing, wiping.
> Moreover, like virDomainAbortJob() calling this API
> will block until job has either completed or aborted.
> ---
> include/libvirt/libvirt.h.in | 3 ++
> src/driver.h | 5 ++++
> src/libvirt.c | 49 ++++++++++++++++++++++++++++++++++++++++++
> src/libvirt_public.syms | 1 +
> src/remote/remote_driver.c | 1 +
> src/remote/remote_protocol.x | 8 ++++++-
> src/remote_protocol-structs | 5 ++++
> 7 files changed, 71 insertions(+), 1 deletions(-)
>
> diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
> index 7d41642..77ec3f0 100644
> --- a/include/libvirt/libvirt.h.in
> +++ b/include/libvirt/libvirt.h.in
> @@ -2513,6 +2513,9 @@ int virStorageVolResize
(virStorageVolPtr vol,
> unsigned long long
capacity,
> unsigned int flags);
>
> +int virStorageVolAbortJob (virStorageVolPtr vol,
> + unsigned int flags);
> +
No, virStorageVolGetJobInfo() API to go with it ? IMHO we should have
both, so we mirror the virDomain job API design.
Regards,
Daniel
yeah, virStorageVolGetJobInfo() is one of the improvements I'm
mentioning in cover letter. But I've decided to not implement it for now
as another huge bunch of code would have to be rewritten make this patch
set unbearable big. But if it is a show stopper I can rewrite and post v2.