The new blktap implemention changes arg of tap driver type from ''tap:qcow'' to ''tap:tapdisk:qcow''. qemu need change the way to read these params. Signed-off-by: Yang Zhang <yan.zhang@intel.com> diff --git a/xenstore.c b/xenstore.c index d2f38d2..6dc613e 100644 --- a/xenstore.c +++ b/xenstore.c @@ -405,13 +405,16 @@ void xenstore_parse_domain_config(int hvm_domid) continue; /* Obtain blktap sub-type prefix */ if (!strcmp(drv, "tap") && params[0]) { - char *offset = strchr(params, '':''); + char *params_old = params; + if (!strncmp(params, "tapdisk:", 8)) + params_old += 8; + char *offset = strchr(params_old, '':''); if (!offset) continue ; free(drv); - drv = malloc(offset - params + 1); - memcpy(drv, params, offset - params); - drv[offset - params] = ''\0''; + drv = malloc(offset - params_old + 1); + memcpy(drv, params_old, offset - params_old); + drv[offset - params_old] = ''\0''; if (!strcmp(drv, "aio")) /* qemu does aio anyway if it can */ format = &bdrv_raw; -- 1.6.0.rc1 Best Regards --yang _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
hi Ian, If the patch is fine to you, can you help me to check in it. Or else when use "tap:tapdisk:qcow2" which introduced by blktap2 at config file will raise error in qemu. Best Regards --yang -----Original Message----- From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Zhang, Yang Sent: 2009年6月9日 11:34 To: Ian Jackson Cc: xen-devel@lists.xensource.com; Keir Fraser Subject: [Xen-devel][PATCH] ioemu: ignore the arg of tapdisk The new blktap implemention changes arg of tap driver type from 'tap:qcow' to 'tap:tapdisk:qcow'. qemu need change the way to read these params. Signed-off-by: Yang Zhang <yan.zhang@intel.com> diff --git a/xenstore.c b/xenstore.c index d2f38d2..6dc613e 100644 --- a/xenstore.c +++ b/xenstore.c @@ -405,13 +405,16 @@ void xenstore_parse_domain_config(int hvm_domid) continue; /* Obtain blktap sub-type prefix */ if (!strcmp(drv, "tap") && params[0]) { - char *offset = strchr(params, ':'); + char *params_old = params; + if (!strncmp(params, "tapdisk:", 8)) + params_old += 8; + char *offset = strchr(params_old, ':'); if (!offset) continue ; free(drv); - drv = malloc(offset - params + 1); - memcpy(drv, params, offset - params); - drv[offset - params] = '\0'; + drv = malloc(offset - params_old + 1); + memcpy(drv, params_old, offset - params_old); + drv[offset - params_old] = '\0'; if (!strcmp(drv, "aio")) /* qemu does aio anyway if it can */ format = &bdrv_raw; -- 1.6.0.rc1 Best Regards --yang _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Zhang, Yang writes ("RE: [Xen-devel][PATCH] ioemu: ignore the arg of tapdisk"):> hi Ian, If the patch is fine to you, can you help me to check in > it. Or else when use "tap:tapdisk:qcow2" which introduced by blktap2 > at config file will raise error in qemu.I thought the conclusion of the discussion was that the requirement to specify `tap:tapdisk'' was a bug in the blktap2 configuration arrangements ? Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Yeah, that does seem to be the conclusion, but it''s very wrong. Let me try again to clear this up. The args in tapdisk problem has NOTHING to do with blktap2. It was a change made for ioemu in 19346. Since the first prefix "tap" means tapdisk, the second prefix is an oddly structured hack to use some of the tapdisk infrastructure towards a new end. Is anyone actually using this? If not, maybe we should cut it to avoid the confusion-inducing clutter. --Dutch On Fri, 19 Jun 2009, Ian Jackson wrote:> Zhang, Yang writes ("RE: [Xen-devel][PATCH] ioemu: ignore the arg of tapdisk"): >> hi Ian, If the patch is fine to you, can you help me to check in >> it. Or else when use "tap:tapdisk:qcow2" which introduced by blktap2 >> at config file will raise error in qemu. > > I thought the conclusion of the discussion was that the requirement to > specify `tap:tapdisk'' was a bug in the blktap2 configuration > arrangements ? > > Ian. > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Dutch Meyer wrote:> Yeah, that does seem to be the conclusion, but it''s very wrong. > > Let me try again to clear this up. The args in tapdisk problem has > NOTHING to do with blktap2. It was a change made for ioemu in 19346. > > Since the first prefix "tap" means tapdisk, the second prefix is an > oddly structured hack to use some of the tapdisk infrastructure > towards a new end. Is anyone actually using this? If not, maybe we > should cut it to avoid the confusion-inducing clutter.ok. So I think you should update the README. :)> --Dutch > > On Fri, 19 Jun 2009, Ian Jackson wrote: > >> Zhang, Yang writes ("RE: [Xen-devel][PATCH] ioemu: ignore the arg of >> tapdisk"): >>> hi Ian, If the patch is fine to you, can you help me to check in >>> it. Or else when use "tap:tapdisk:qcow2" which introduced by blktap2 >>> at config file will raise error in qemu. >> >> I thought the conclusion of the discussion was that the requirement >> to >> specify `tap:tapdisk'' was a bug in the blktap2 configuration >> arrangements ? >> >> Ian. >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel