* [patch 4/6] xenbus: suspend correctly
@ 2006-08-17 13:52 Gerd Hoffmann
0 siblings, 0 replies; only message in thread
From: Gerd Hoffmann @ 2006-08-17 13:52 UTC (permalink / raw)
To: Xen devel list
[-- Attachment #1: Type: text/plain, Size: 260 bytes --]
Hi,
Cleanup correctly on suspend, unregister watches.
Again needed for domU kexec, so the next kernel instance can register
watches without running into -EBUSY.
cheers,
Gerd
--
Gerd Hoffmann <kraxel@suse.de>
http://www.suse.de/~kraxel/julika-dora.jpeg
[-- Attachment #2: xenbus-suspend --]
[-- Type: text/plain, Size: 809 bytes --]
Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
Index: source-lnx-stable-22813/drivers/xen/xenbus/xenbus_xs.c
===================================================================
--- source-lnx-stable-22813.orig/drivers/xen/xenbus/xenbus_xs.c 2006-08-17 15:19:20.000000000 +0200
+++ source-lnx-stable-22813/drivers/xen/xenbus/xenbus_xs.c 2006-08-17 15:20:17.000000000 +0200
@@ -665,7 +665,17 @@ EXPORT_SYMBOL_GPL(unregister_xenbus_watc
void xs_suspend(void)
{
+ struct xenbus_watch *watch;
+ char token[sizeof(watch) * 2 + 1];
+
down_write(&xs_state.suspend_mutex);
+
+ /* No need for watches_lock: the suspend_mutex is sufficient. */
+ list_for_each_entry(watch, &watches, list) {
+ sprintf(token, "%lX", (long)watch);
+ xs_unwatch(watch->node, token);
+ }
+
mutex_lock(&xs_state.request_mutex);
}
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-08-17 13:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-17 13:52 [patch 4/6] xenbus: suspend correctly Gerd Hoffmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.