Re: [libvirt] [PATCH 5/9] Introduce public API for cancelling async domain jobs

2010-02-26 Thread Daniel Veillard
On Thu, Feb 18, 2010 at 03:56:11PM +, Daniel P. Berrange wrote:
> The new virDomainAbortJob() method provides a way for a second
> thread to abort an ongoing job run by another thread. This
> extends to any API with  which the virDomainGetJobInfo() API
> is intended to work. Cancellation is not guarenteed, rather best
> effort on part of the hypervisor and not required to be implmented.
> 
> * include/libvirt/libvirt.h.in: Define virDomainAbortJob()
> ---
>  include/libvirt/libvirt.h.in |1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
> index 51c0844..25f10c8 100644
> --- a/include/libvirt/libvirt.h.in
> +++ b/include/libvirt/libvirt.h.in
> @@ -1834,6 +1834,7 @@ struct _virDomainJobInfo {
>  
>  int virDomainGetJobInfo(virDomainPtr dom,
>  virDomainJobInfoPtr info);
> +int virDomainAbortJob(virDomainPtr dom);

  I would feel a bit better if we could add a flags there for future
extensions, like POSIX kill() ended up with many different semantics
we may have to refine at some point.

Daniel

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

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCH 5/9] Introduce public API for cancelling async domain jobs

2010-02-18 Thread Daniel P. Berrange
The new virDomainAbortJob() method provides a way for a second
thread to abort an ongoing job run by another thread. This
extends to any API with  which the virDomainGetJobInfo() API
is intended to work. Cancellation is not guarenteed, rather best
effort on part of the hypervisor and not required to be implmented.

* include/libvirt/libvirt.h.in: Define virDomainAbortJob()
---
 include/libvirt/libvirt.h.in |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index 51c0844..25f10c8 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -1834,6 +1834,7 @@ struct _virDomainJobInfo {
 
 int virDomainGetJobInfo(virDomainPtr dom,
 virDomainJobInfoPtr info);
+int virDomainAbortJob(virDomainPtr dom);
 
 
 #ifdef __cplusplus
-- 
1.6.6

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCH 5/9] Introduce public API for cancelling async domain jobs

2010-02-04 Thread Daniel P. Berrange
The new virDomainAbortJob() method provides a way for a second
thread to abort an ongoing job run by another thread. This
extends to any API with  which the virDomainGetJobInfo() API
is intended to work. Cancellation is not guarenteed, rather best
effort on part of the hypervisor and not required to be implmented.

* include/libvirt/libvirt.h.in: Define virDomainAbortJob()
---
 include/libvirt/libvirt.h.in |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index 5058bc0..0ffcf11 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -1804,6 +1804,8 @@ struct _virDomainJobInfo {
 int virDomainGetJobInfo(virDomainPtr dom,
 virDomainJobInfoPtr info);
 
+int virDomainAbortJob(virDomainPtr dom);
+
 #ifdef __cplusplus
 }
 #endif
-- 
1.6.6

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list