WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Xen

xen-devel

[Top] [All Lists]

[Xen-devel] [PATCH] [pvops] Report suspending error to xenbus

To: Jeremy Fitzhardinge <Jeremy.Fitzhardinge@xxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Subject: [Xen-devel] [PATCH] [pvops] Report suspending error to xenbus
From: Frank Pan <frankpzh@xxxxxxxxx>
Date: 2011年3月30日 21:51:14 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: 2011年3月30日 06:52:23 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=AQQR32sAh25TMQGmL99puJEvWCn/yO95ebCONGtoAkI=; b=voofwd6QGLnLIpRggcX84RYjsbdHFJjGL/jXurvU3K++yIgyU29bmbNcOUBR8gYq2Z XuKTK90zVTzhLi8Weey588lWi49s8hnkxWwkzWoLhUDXe5F/a6Y2tC/D5rSixLMVoyGv 8Qv1XUXNIH19ykJNJ4vDXL8sGJwg/+PBc149c=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; b=j9MhvOY9Vy+kxsC8ScXknHl8HCdgH33leML6gwHgUQ9p45VICS8mj5HXbLkaxEhC2m 7l/bMt+IPeWwFtKLAse2+XzZA+Cy0jhEC+2jFOh3CGA+rkMF2XmyjLf3bKmEz3c77bPO dLmAF8zXW8207tpDUjDlD+9aEcc9ljG1k/5pE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
This patch works with "Protocol change of suspending through xenbus".
Guest will post reason on "control/shutdown-error" when suspending is failed.
Xend/libxl can make use of this information to avoid waste of time from timeout.
If Xend/libxl has no such feature, the xenbus_write will failed and ignored.
Signed-off-by: Frank Pan <frankpzh@xxxxxxxxx>
---
 linux-2.6-xen/drivers/xen/manage.c | 7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/linux-2.6-xen/drivers/xen/manage.c
b/linux-2.6-xen/drivers/xen/manage.c
index fa1d24c..3eec337 100644
--- a/linux-2.6-xen/drivers/xen/manage.c
+++ b/linux-2.6-xen/drivers/xen/manage.c
@@ -97,6 +97,7 @@ static void do_suspend(void)
 {
 int err;
 int cancelled = 1;
+ int failed = 1;
 shutting_down = SHUTDOWN_SUSPEND;
@@ -144,6 +145,9 @@ static void do_suspend(void)
 printk(KERN_ERR "failed to start xen_suspend: %d\n", err);
 cancelled = 1;
 }
+ else {
+ failed = 0;
+ }
 out_resume:
 if (!cancelled) {
@@ -166,6 +170,8 @@ out_destroy_sm:
 stop_machine_destroy();
 out:
+ if (failed)
+ xenbus_write(XBT_NIL, "control", "shutdown-error", "failed");
 shutting_down = SHUTDOWN_INVALID;
 }
 #endif /* CONFIG_PM_SLEEP */
@@ -213,6 +219,7 @@ static void shutdown_handler(struct xenbus_watch *watch,
 #endif
 } else {
 printk(KERN_INFO "Ignoring shutdown request: %s\n", str);
+ xenbus_write(XBT_NIL, "control", "shutdown-error", "unknown 
request");
 shutting_down = SHUTDOWN_INVALID;
 }
-- 
1.7.0.4
-- 
潘震皓, Frank Pan
Computer Science and Technology
Tsinghua University
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] [pvops] Report suspending error to xenbus, Frank Pan <=
Previous by Date: [Xen-devel] [PATCH] Protocol change of suspending through xenbus , Frank Pan
Next by Date: [Xen-devel] BUG at xen4.1/kernel 2.6.32.35 at a CentOS 5.5 when starting a VM , Gerd Jakobovitsch
Previous by Thread: [Xen-devel] [PATCH] Protocol change of suspending through xenbus , Frank Pan
Next by Thread: [Xen-devel] BUG at xen4.1/kernel 2.6.32.35 at a CentOS 5.5 when starting a VM , Gerd Jakobovitsch
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /