[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 08/28] libxl: libxl__destroy_domid: Bring dm destruction together
Change the order of operations so that the dm determination and destruction occur together. The functional change is that the xenstore reads relating to the dm determination now occur after the pci devices have been removed and the domain has been paused. This should not have any visible effect. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- v6: New patch. --- tools/libxl/libxl.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index d96189d..1ac5d81 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -1621,6 +1621,19 @@ void libxl__destroy_domid(libxl__egc *egc, libxl__destroy_domid_state *dis) goto out; } + if (libxl__device_pci_destroy_all(gc, domid) < 0) + LOG(ERROR, "pci shutdown failed for domid %d", domid); + rc = xc_domain_pause(ctx->xch, domid); + if (rc < 0) { + LOGEV(ERROR, rc, "xc_domain_pause failed for %d", domid); + } + + dom_path = libxl__xs_get_dompath(gc, domid); + if (!dom_path) { + rc = ERROR_FAIL; + goto out; + } + switch (libxl__domain_type(gc, domid)) { case LIBXL_DOMAIN_TYPE_HVM: if (libxl_get_stubdom_id(CTX, domid)) { @@ -1639,18 +1652,6 @@ void libxl__destroy_domid(libxl__egc *egc, libxl__destroy_domid_state *dis) abort(); } - dom_path = libxl__xs_get_dompath(gc, domid); - if (!dom_path) { - rc = ERROR_FAIL; - goto out; - } - - if (libxl__device_pci_destroy_all(gc, domid) < 0) - LOG(ERROR, "pci shutdown failed for domid %d", domid); - rc = xc_domain_pause(ctx->xch, domid); - if (rc < 0) { - LOGEV(ERROR, rc, "xc_domain_pause failed for %d", domid); - } if (dm_present) { if (libxl__destroy_device_model(gc, domid) < 0) LOG(ERROR, "libxl__destroy_device_model failed for %d", domid); -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |