[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] libxl: don't launch more than one tapdisk process for each disk
On Tue, Mar 05, 2013 at 05:56:42PM +0100, Roger Pau Monne wrote: > When adding a disk don't launch multiple tapdisk instances for the > same disk, if transaction fails in device_disk_add reuse the same > tapdisk for further tries instead of creating a new instance each > time a transaction fails. > So this patch should be backported to Xen 4.2 after it has passed xen-unstable tests. See Darren's reply with a Xen 4.2.1 backport included. -- Pasi > Reported-by: Darren Shepherd <darren.s.shepherd@xxxxxxxxx> > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> > --- > tools/libxl/libxl.c | 17 ++++++++++------- > 1 files changed, 10 insertions(+), 7 deletions(-) > > diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c > index 73e0dc3..345d88b 100644 > --- a/tools/libxl/libxl.c > +++ b/tools/libxl/libxl.c > @@ -2032,7 +2032,7 @@ static void device_disk_add(libxl__egc *egc, uint32_t > domid, > STATE_AO_GC(aodev->ao); > flexarray_t *front = NULL; > flexarray_t *back = NULL; > - char *dev, *script; > + char *dev = NULL, *script; > libxl__device *device; > int rc; > libxl_ctx *ctx = gc->owner; > @@ -2095,12 +2095,15 @@ static void device_disk_add(libxl__egc *egc, uint32_t > domid, > break; > > case LIBXL_DISK_BACKEND_TAP: > - dev = libxl__blktap_devpath(gc, disk->pdev_path, > disk->format); > - if (!dev) { > - LOG(ERROR, "failed to get blktap devpath for %p\n", > - disk->pdev_path); > - rc = ERROR_FAIL; > - goto out; > + if (dev == NULL) { > + dev = libxl__blktap_devpath(gc, disk->pdev_path, > + disk->format); > + if (!dev) { > + LOG(ERROR, "failed to get blktap devpath for %p\n", > + disk->pdev_path); > + rc = ERROR_FAIL; > + goto out; > + } > } > flexarray_append(back, "tapdisk-params"); > flexarray_append(back, libxl__sprintf(gc, "%s:%s", > -- > 1.7.7.5 (Apple Git-26) > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxx > http://lists.xen.org/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |