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

Re: [libvirt] [PATCH v2 1/4] api: Add public api for 'reset'



On Thu, Sep 29, 2011 at 06:52:33AM -0600, Eric Blake wrote:
> On 09/29/2011 02:53 AM, Xu He Jie wrote:
> >Add new public api for 'reset'.
> >It can reset domain immediately without any guest shutdown.
> >
> 
> >
> >  /**
> >+ * virDomainReset:
> >+ * @domain: a domain object
> >+ * @flags: extra flags for the reboot operation, not used yet
> >+ *
> >+ * Reset a domain immediately without any guest OS shutdown.
> >+ * Reset emulates the power reset of a button on a machine, i.e.
> >+ * All hardware see the RST line set and reinitialize their internal state.
> >+ *
> >+ * Note that the risk of data loss caused by reset without any
> >+ * guest OS shutdown.
> 
> I made some grammar tweaks.
> 
> >+++ b/src/libvirt_public.syms
> >@@ -492,6 +492,7 @@ LIBVIRT_0.9.5 {
> >  LIBVIRT_0.9.7 {
> >      global:
> >          virDomainSnapshotGetParent;
> >+        virDomainReset;
> 
> Also, I sorted these.  I'll squash this in and push shortly.
> 
> diff --git i/src/libvirt.c w/src/libvirt.c
> index 7fcbda4..9080b2f 100644
> --- i/src/libvirt.c
> +++ w/src/libvirt.c
> @@ -3022,10 +3022,10 @@ error:
>   * @flags: extra flags for the reboot operation, not used yet
>   *
>   * Reset a domain immediately without any guest OS shutdown.
> - * Reset emulates the power reset of a button on a machine, i.e.
> - * All hardware see the RST line set and reinitialize their internal state.
> + * Reset emulates the power reset button on a machine, where all
> + * hardware sees the RST line set and reinitializes internal state.
>   *
> - * Note that the risk of data loss caused by reset without any
> + * Note that there is a risk of data loss caused by reset without any
>   * guest OS shutdown.
>   *
>   * Returns 0 in case of success and -1 in case of failure.
> diff --git i/src/libvirt_public.syms w/src/libvirt_public.syms
> index 9e6f104..afea29b 100644
> --- i/src/libvirt_public.syms
> +++ w/src/libvirt_public.syms
> @@ -491,8 +491,8 @@ LIBVIRT_0.9.5 {
> 
>  LIBVIRT_0.9.7 {
>      global:
> -        virDomainSnapshotGetParent;
>          virDomainReset;
> +        virDomainSnapshotGetParent;
>  } LIBVIRT_0.9.5;
> 
>  # .... define new API here using predicted next version number ....

  Ah, I was aobout to commit those too,

please add the following to 3/4 too then


    add remote_protocol-structs

diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs
index 53705bf..2c893a0 100644
--- a/src/remote_protocol-structs
+++ b/src/remote_protocol-structs
@@ -400,6 +400,9 @@ struct remote_domain_reboot_args {
         remote_nonnull_domain      dom;
         u_int                      flags;
 };
+struct remote_domain_reset_args {
+        remote_nonnull_domain      dom;
+};
 struct remote_domain_destroy_args {
         remote_nonnull_domain      dom;
 };
@@ -1966,4 +1969,5 @@ enum remote_procedure {
         REMOTE_PROC_DOMAIN_MIGRATE_GET_MAX_SPEED = 242,
         REMOTE_PROC_DOMAIN_BLOCK_STATS_FLAGS = 243,
         REMOTE_PROC_DOMAIN_SNAPSHOT_GET_PARENT = 244,
+        REMOTE_PROC_DOMAIN_RESET = 245,
 };

-- 
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]