xen-vtx-unstable
changeset 6209:8203b7d536d3
Recreate watches on domain restore.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author | cl349@firebug.cl.cam.ac.uk |
---|---|
date | Wed Aug 17 10:18:34 2005 +0000 (2005-08-17) |
parents | 27a4a073fc75 |
children | b9b28912fc7a 80291913492d |
files | linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c linux-2.6-xen-sparse/include/asm-xen/xenbus.h |
line diff
1.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c Wed Aug 17 10:18:13 2005 +0000 1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c Wed Aug 17 10:18:34 2005 +0000 1.3 @@ -309,6 +309,7 @@ void xenbus_suspend(void) 1.4 void xenbus_resume(void) 1.5 { 1.6 xb_init_comms(); 1.7 + reregister_xenbus_watches(); 1.8 up(&xenbus_lock); 1.9 } 1.10
2.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c Wed Aug 17 10:18:13 2005 +0000 2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c Wed Aug 17 10:18:34 2005 +0000 2.3 @@ -496,6 +496,18 @@ void unregister_xenbus_watch(struct xenb 2.4 watch->node, err); 2.5 } 2.6 2.7 +/* Re-register callbacks to all watches. */ 2.8 +void reregister_xenbus_watches(void) 2.9 +{ 2.10 + struct xenbus_watch *watch; 2.11 + char token[sizeof(watch) * 2 + 1]; 2.12 + 2.13 + list_for_each_entry(watch, &watches, list) { 2.14 + sprintf(token, "%lX", (long)watch); 2.15 + xs_watch(watch->node, token); 2.16 + } 2.17 +} 2.18 + 2.19 static int watch_thread(void *unused) 2.20 { 2.21 for (;;) {
3.1 --- a/linux-2.6-xen-sparse/include/asm-xen/xenbus.h Wed Aug 17 10:18:13 2005 +0000 3.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/xenbus.h Wed Aug 17 10:18:34 2005 +0000 3.3 @@ -121,6 +121,7 @@ void unregister_xenstore_notifier(struct 3.4 3.5 int register_xenbus_watch(struct xenbus_watch *watch); 3.6 void unregister_xenbus_watch(struct xenbus_watch *watch); 3.7 +void reregister_xenbus_watches(void); 3.8 3.9 /* Called from xen core code. */ 3.10 void xenbus_suspend(void);