[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Merge.
# HG changeset patch # User emellor@ewan # Node ID 9ff1bea68d51126fbcf4c084ab1650f8cba81f72 # Parent f9296342d9b213c519baf1b614d511b779679a11 # Parent 70b6e60df7502463a240689ed0f6b4975b9a9a62 Merge. diff -r f9296342d9b2 -r 9ff1bea68d51 .hgignore --- a/.hgignore Tue Sep 27 12:53:06 2005 +++ b/.hgignore Tue Sep 27 12:54:02 2005 @@ -158,6 +158,7 @@ ^tools/xenstore/xs_dom0_test$ ^tools/xenstore/xs_random$ ^tools/xenstore/xs_stress$ +^tools/xenstore/xs_tdb_dump$ ^tools/xenstore/xs_test$ ^tools/xenstore/xs_watch_stress$ ^tools/xentrace/xenctx$ diff -r f9296342d9b2 -r 9ff1bea68d51 Makefile --- a/Makefile Tue Sep 27 12:53:06 2005 +++ b/Makefile Tue Sep 27 12:54:02 2005 @@ -164,7 +164,7 @@ uninstall: DESTDIR= uninstall: D=$(DESTDIR) uninstall: - [ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-`date +%s` + [ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-`date +%s` || true rm -rf $(D)/etc/init.d/xend* rm -rf $(D)/etc/hotplug/xen-backend.agent rm -rf $(D)/var/run/xen* $(D)/var/lib/xen* diff -r f9296342d9b2 -r 9ff1bea68d51 linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c --- a/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c Tue Sep 27 12:53:06 2005 +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c Tue Sep 27 12:54:02 2005 @@ -80,6 +80,15 @@ return; } + /* Map the shared frame, irq etc. */ + err = blkif_map(be->blkif, ring_ref, evtchn); + if (err) { + xenbus_dev_error(be->dev, err, "mapping ring-ref %lu port %u", + ring_ref, evtchn); + return; + } + /* XXX From here on should 'blkif_unmap' on error. */ + again: /* Supply the information about the device the frontend needs */ err = xenbus_transaction_start(); @@ -112,16 +121,8 @@ goto abort; } - /* Map the shared frame, irq etc. */ - err = blkif_map(be->blkif, ring_ref, evtchn); - if (err) { - xenbus_dev_error(be->dev, err, "mapping ring-ref %lu port %u", - ring_ref, evtchn); - goto abort; - } - err = xenbus_transaction_end(0); - if (err == EAGAIN) + if (err == -EAGAIN) goto again; if (err) { xenbus_dev_error(be->dev, err, "ending transaction", diff -r f9296342d9b2 -r 9ff1bea68d51 linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c Tue Sep 27 12:53:06 2005 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c Tue Sep 27 12:54:02 2005 @@ -591,29 +591,25 @@ goto abort_transaction; } - info->backend = backend; - backend = NULL; - - info->watch.node = info->backend; - info->watch.callback = watch_for_status; - err = register_xenbus_watch(&info->watch); - if (err) { - message = "registering watch on backend"; - goto abort_transaction; - } - err = xenbus_transaction_end(0); if (err) { - if (err == EAGAIN) + if (err == -EAGAIN) goto again; xenbus_dev_error(dev, err, "completing transaction"); goto destroy_blkring; } - out: - if (backend) - kfree(backend); - return err; + info->watch.node = backend; + info->watch.callback = watch_for_status; + err = register_xenbus_watch(&info->watch); + if (err) { + message = "registering watch on backend"; + goto destroy_blkring; + } + + info->backend = backend; + + return 0; abort_transaction: xenbus_transaction_end(1); @@ -621,7 +617,10 @@ xenbus_dev_error(dev, err, "%s", message); destroy_blkring: blkif_free(info); - goto out; + out: + if (backend) + kfree(backend); + return err; } /* Setup supplies the backend dir, virtual device. diff -r f9296342d9b2 -r 9ff1bea68d51 linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Tue Sep 27 12:53:06 2005 +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Tue Sep 27 12:54:02 2005 @@ -1148,31 +1148,27 @@ goto abort_transaction; } - info->backend = backend; - backend = NULL; - - info->watch.node = info->backend; + err = xenbus_transaction_end(0); + if (err) { + if (err == -EAGAIN) + goto again; + xenbus_dev_error(dev, err, "completing transaction"); + goto destroy_ring; + } + + info->watch.node = backend; info->watch.callback = watch_for_status; err = register_xenbus_watch(&info->watch); if (err) { message = "registering watch on backend"; - goto abort_transaction; - } - - err = xenbus_transaction_end(0); - if (err) { - if (err == EAGAIN) - goto again; - xenbus_dev_error(dev, err, "completing transaction"); goto destroy_ring; } + info->backend = backend; + netif_state = NETIF_STATE_CONNECTED; - out: - if (backend) - kfree(backend); - return err; + return 0; abort_transaction: xenbus_transaction_end(1); @@ -1180,7 +1176,10 @@ xenbus_dev_error(dev, err, "%s", message); destroy_ring: shutdown_device(info); - goto out; + out: + if (backend) + kfree(backend); + return err; } /* Setup supplies the backend dir, virtual device. diff -r f9296342d9b2 -r 9ff1bea68d51 linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c --- a/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c Tue Sep 27 12:53:06 2005 +++ b/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c Tue Sep 27 12:54:02 2005 @@ -88,6 +88,26 @@ return; } + err = tpmif_map(be->tpmif, ringref, evtchn); + if (err) { + xenbus_dev_error(be->dev, err, + "mapping shared-frame %lu port %u", + ringref, evtchn); + return; + } + + err = tpmif_vtpm_open(be->tpmif, + be->frontend_id, + be->instance); + if (err) { + xenbus_dev_error(be->dev, err, + "queueing vtpm open packet"); + /* + * Should close down this device and notify FE + * about closure. + */ + return; + } /* * Tell the front-end that we are ready to go - @@ -107,29 +127,8 @@ goto abort; } - err = tpmif_map(be->tpmif, ringref, evtchn); - if (err) { - xenbus_dev_error(be->dev, err, - "mapping shared-frame %lu port %u", - ringref, evtchn); - goto abort; - } - - err = tpmif_vtpm_open(be->tpmif, - be->frontend_id, - be->instance); - if (err) { - xenbus_dev_error(be->dev, err, - "queueing vtpm open packet"); - /* - * Should close down this device and notify FE - * about closure. - */ - goto abort; - } - err = xenbus_transaction_end(0); - if (err == EAGAIN) + if (err == -EAGAIN) goto again; if (err) { xenbus_dev_error(be->dev, err, "end of transaction"); diff -r f9296342d9b2 -r 9ff1bea68d51 linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c --- a/linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c Tue Sep 27 12:53:06 2005 +++ b/linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c Tue Sep 27 12:54:02 2005 @@ -352,29 +352,25 @@ goto abort_transaction; } - info->backend = backend; - backend = NULL; - - info->watch.node = info->backend; + err = xenbus_transaction_end(0); + if (err == -EAGAIN) + goto again; + if (err) { + xenbus_dev_error(dev, err, "completing transaction"); + goto destroy_tpmring; + } + + info->watch.node = backend; info->watch.callback = watch_for_status; err = register_xenbus_watch(&info->watch); if (err) { message = "registering watch on backend"; - goto abort_transaction; - } - - err = xenbus_transaction_end(0); - if (err == EAGAIN) - goto again; - if (err) { - xenbus_dev_error(dev, err, "completing transaction"); goto destroy_tpmring; } -out: - if (backend) - kfree(backend); - return err; + info->backend = backend; + + return 0; abort_transaction: xenbus_transaction_end(1); @@ -382,7 +378,10 @@ xenbus_dev_error(dev, err, "%s", message); destroy_tpmring: destroy_tpmring(info, &my_private); - goto out; +out: + if (backend) + kfree(backend); + return err; } diff -r f9296342d9b2 -r 9ff1bea68d51 tools/console/daemon/io.c --- a/tools/console/daemon/io.c Tue Sep 27 12:53:06 2005 +++ b/tools/console/daemon/io.c Tue Sep 27 12:54:02 2005 @@ -399,7 +399,7 @@ while (xc_domain_getinfo(xc, domid, 1, &dominfo) == 1) { dom = lookup_domain(dominfo.domid); - if (dominfo.dying || dominfo.crashed || dominfo.shutdown) { + if (dominfo.dying) { if (dom) shutdown_domain(dom); } else { diff -r f9296342d9b2 -r 9ff1bea68d51 tools/xenstore/xenstored_domain.c --- a/tools/xenstore/xenstored_domain.c Tue Sep 27 12:53:06 2005 +++ b/tools/xenstore/xenstored_domain.c Tue Sep 27 12:54:02 2005 @@ -63,6 +63,8 @@ /* The connection associated with this. */ struct connection *conn; + /* Have we noticed that this domain is shutdown? */ + int shutdown; }; static LIST_HEAD(domains); @@ -222,19 +224,25 @@ { xc_dominfo_t dominfo; struct domain *domain, *tmp; - int released = 0; + int notify = 0; list_for_each_entry_safe(domain, tmp, &domains, list) { if (xc_domain_getinfo(*xc_handle, domain->domid, 1, &dominfo) == 1 && - dominfo.domid == domain->domid && - !dominfo.dying && !dominfo.crashed && !dominfo.shutdown) - continue; + dominfo.domid == domain->domid) { + if ((dominfo.crashed || dominfo.shutdown) + && !domain->shutdown) { + domain->shutdown = 1; + notify = 1; + } + if (!dominfo.dying) + continue; + } talloc_free(domain->conn); - released++; - } - - if (released) + notify = 1; + } + + if (notify) fire_watches(NULL, "@releaseDomain", false); } @@ -272,6 +280,7 @@ struct domain *domain; domain = talloc(context, struct domain); domain->port = 0; + domain->shutdown = 0; domain->domid = domid; domain->path = talloc_strdup(domain, path); domain->page = xc_map_foreign_range(*xc_handle, domain->domid, _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |