* [PATCH for 4.5] libxl: Tell qemu to use raw format when using a tapdisk
@ 2014-12-09 14:04 George Dunlap
2014-12-09 14:32 ` Wei Liu
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: George Dunlap @ 2014-12-09 14:04 UTC (permalink / raw)
To: xen-devel; +Cc: George Dunlap, Ian Jackson, Wei Liu, Ian Campbell
At the moment libxl unconditinally passes the underlying file format
to qemu in the device string. However, when tapdisk is in use,
tapdisk handles the underlying format and presents qemu with
effectively a raw disk. When qemu looks at the tapdisk block device
and doesn't find the image format it was looking for, it will fail.
This effectively means that tapdisk cannot be used with HVM domains at
the moment except for raw files.
Instead, if we're using a tapdisk backend, tell qemu to use a raw file
format.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
---
CC: Ian Campbell <ian.campbell@citrix.com>
CC: Ian Jackson <ian.jackson@citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Konrad Wilk <konrad.wilk@oracle.com>
Release exception justification: This fixes a bug in functionality, in
that at the moment HVM guests cannot boot with tapdisk and vhd format.
This is not a regression in xl functionality per se, since (AFAICT)
this has never worked. However, given that 4.5 is the first release
without xend, this *does* represent a regression in functionality for
Xen as a whole (since before people using hvm guest with vhd on blktap
could use xend).
The fix is very simple and should only affect codepaths that already
don't work, so the risk of regressions should be very low.
While preparing this patch, I also noticed that cdroms will ignore the
backend parameter and treat everything as a file. This is a bug but I
think it's a much less important one to address this late in the
release cycle.
---
tools/libxl/libxl_dm.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index b25b574..10f3090 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -797,11 +797,14 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
continue;
}
- if (disks[i].backend == LIBXL_DISK_BACKEND_TAP)
+ if (disks[i].backend == LIBXL_DISK_BACKEND_TAP) {
+ format = qemu_disk_format_string(LIBXL_DISK_FORMAT_RAW);
pdev_path = libxl__blktap_devpath(gc, disks[i].pdev_path,
disks[i].format);
- else
+ } else {
pdev_path = disks[i].pdev_path;
+ }
+
/*
* Explicit sd disks are passed through as is.
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH for 4.5] libxl: Tell qemu to use raw format when using a tapdisk
2014-12-09 14:04 [PATCH for 4.5] libxl: Tell qemu to use raw format when using a tapdisk George Dunlap
@ 2014-12-09 14:32 ` Wei Liu
2014-12-09 14:34 ` George Dunlap
2014-12-09 14:48 ` Ian Campbell
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Wei Liu @ 2014-12-09 14:32 UTC (permalink / raw)
To: George Dunlap; +Cc: Ian Jackson, Wei Liu, Ian Campbell, xen-devel
On Tue, Dec 09, 2014 at 02:04:19PM +0000, George Dunlap wrote:
> At the moment libxl unconditinally passes the underlying file format
> to qemu in the device string. However, when tapdisk is in use,
> tapdisk handles the underlying format and presents qemu with
> effectively a raw disk. When qemu looks at the tapdisk block device
> and doesn't find the image format it was looking for, it will fail.
>
> This effectively means that tapdisk cannot be used with HVM domains at
> the moment except for raw files.
>
> Instead, if we're using a tapdisk backend, tell qemu to use a raw file
> format.
>
> Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
> ---
> CC: Ian Campbell <ian.campbell@citrix.com>
> CC: Ian Jackson <ian.jackson@citrix.com>
> CC: Wei Liu <wei.liu2@citrix.com>
> CC: Konrad Wilk <konrad.wilk@oracle.com>
>
Acked-by: Wei Liu <wei.liu2@citrix.com>
> Release exception justification: This fixes a bug in functionality, in
> that at the moment HVM guests cannot boot with tapdisk and vhd format.
>
> This is not a regression in xl functionality per se, since (AFAICT)
> this has never worked. However, given that 4.5 is the first release
> without xend, this *does* represent a regression in functionality for
> Xen as a whole (since before people using hvm guest with vhd on blktap
> could use xend).
>
> The fix is very simple and should only affect codepaths that already
> don't work, so the risk of regressions should be very low.
>
> While preparing this patch, I also noticed that cdroms will ignore the
> backend parameter and treat everything as a file. This is a bug but I
> think it's a much less important one to address this late in the
> release cycle.
We should create a bug tracker entry for this.
> ---
> tools/libxl/libxl_dm.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
> index b25b574..10f3090 100644
> --- a/tools/libxl/libxl_dm.c
> +++ b/tools/libxl/libxl_dm.c
> @@ -797,11 +797,14 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
> continue;
> }
>
> - if (disks[i].backend == LIBXL_DISK_BACKEND_TAP)
> + if (disks[i].backend == LIBXL_DISK_BACKEND_TAP) {
> + format = qemu_disk_format_string(LIBXL_DISK_FORMAT_RAW);
> pdev_path = libxl__blktap_devpath(gc, disks[i].pdev_path,
> disks[i].format);
> - else
> + } else {
> pdev_path = disks[i].pdev_path;
> + }
> +
Minor nit, extra blank line, but this alone doesn't warrant a resend.
>
> /*
> * Explicit sd disks are passed through as is.
> --
> 1.9.1
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH for 4.5] libxl: Tell qemu to use raw format when using a tapdisk
2014-12-09 14:32 ` Wei Liu
@ 2014-12-09 14:34 ` George Dunlap
0 siblings, 0 replies; 9+ messages in thread
From: George Dunlap @ 2014-12-09 14:34 UTC (permalink / raw)
To: Wei Liu; +Cc: Ian Jackson, Ian Campbell, xen-devel
On 12/09/2014 02:32 PM, Wei Liu wrote:
> On Tue, Dec 09, 2014 at 02:04:19PM +0000, George Dunlap wrote:
>> At the moment libxl unconditinally passes the underlying file format
>> to qemu in the device string. However, when tapdisk is in use,
>> tapdisk handles the underlying format and presents qemu with
>> effectively a raw disk. When qemu looks at the tapdisk block device
>> and doesn't find the image format it was looking for, it will fail.
>>
>> This effectively means that tapdisk cannot be used with HVM domains at
>> the moment except for raw files.
>>
>> Instead, if we're using a tapdisk backend, tell qemu to use a raw file
>> format.
>>
>> Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
>> ---
>> CC: Ian Campbell <ian.campbell@citrix.com>
>> CC: Ian Jackson <ian.jackson@citrix.com>
>> CC: Wei Liu <wei.liu2@citrix.com>
>> CC: Konrad Wilk <konrad.wilk@oracle.com>
>>
>
> Acked-by: Wei Liu <wei.liu2@citrix.com>
>
>> Release exception justification: This fixes a bug in functionality, in
>> that at the moment HVM guests cannot boot with tapdisk and vhd format.
>>
>> This is not a regression in xl functionality per se, since (AFAICT)
>> this has never worked. However, given that 4.5 is the first release
>> without xend, this *does* represent a regression in functionality for
>> Xen as a whole (since before people using hvm guest with vhd on blktap
>> could use xend).
>>
>> The fix is very simple and should only affect codepaths that already
>> don't work, so the risk of regressions should be very low.
>>
>> While preparing this patch, I also noticed that cdroms will ignore the
>> backend parameter and treat everything as a file. This is a bug but I
>> think it's a much less important one to address this late in the
>> release cycle.
>
> We should create a bug tracker entry for this.
>
>> ---
>> tools/libxl/libxl_dm.c | 7 +++++--
>> 1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
>> index b25b574..10f3090 100644
>> --- a/tools/libxl/libxl_dm.c
>> +++ b/tools/libxl/libxl_dm.c
>> @@ -797,11 +797,14 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
>> continue;
>> }
>>
>> - if (disks[i].backend == LIBXL_DISK_BACKEND_TAP)
>> + if (disks[i].backend == LIBXL_DISK_BACKEND_TAP) {
>> + format = qemu_disk_format_string(LIBXL_DISK_FORMAT_RAW);
>> pdev_path = libxl__blktap_devpath(gc, disks[i].pdev_path,
>> disks[i].format);
>> - else
>> + } else {
>> pdev_path = disks[i].pdev_path;
>> + }
>> +
>
> Minor nit, extra blank line, but this alone doesn't warrant a resend.
Yes, I noticed this as soon as I sent it. :-/
-George
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH for 4.5] libxl: Tell qemu to use raw format when using a tapdisk
2014-12-09 14:04 [PATCH for 4.5] libxl: Tell qemu to use raw format when using a tapdisk George Dunlap
2014-12-09 14:32 ` Wei Liu
@ 2014-12-09 14:48 ` Ian Campbell
2014-12-10 16:30 ` Konrad Rzeszutek Wilk
2014-12-15 15:29 ` Wei Liu
[not found] ` <20141215154710.GC8049@zion.uk.xensource.com>
3 siblings, 1 reply; 9+ messages in thread
From: Ian Campbell @ 2014-12-09 14:48 UTC (permalink / raw)
To: George Dunlap; +Cc: Ian Jackson, Wei Liu, xen-devel
On Tue, 2014-12-09 at 14:04 +0000, George Dunlap wrote:
> At the moment libxl unconditinally passes the underlying file format
> to qemu in the device string. However, when tapdisk is in use,
> tapdisk handles the underlying format and presents qemu with
> effectively a raw disk. When qemu looks at the tapdisk block device
> and doesn't find the image format it was looking for, it will fail.
>
> This effectively means that tapdisk cannot be used with HVM domains at
> the moment except for raw files.
>
> Instead, if we're using a tapdisk backend, tell qemu to use a raw file
> format.
>
> Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
> ---
> CC: Ian Campbell <ian.campbell@citrix.com>
> CC: Ian Jackson <ian.jackson@citrix.com>
> CC: Wei Liu <wei.liu2@citrix.com>
> CC: Konrad Wilk <konrad.wilk@oracle.com>
>
> Release exception justification:
I agree with your reasoning.
> This fixes a bug in functionality, in
> that at the moment HVM guests cannot boot with tapdisk and vhd format.
>
> This is not a regression in xl functionality per se, since (AFAICT)
> this has never worked. However, given that 4.5 is the first release
> without xend, this *does* represent a regression in functionality for
> Xen as a whole (since before people using hvm guest with vhd on blktap
> could use xend).
>
> The fix is very simple and should only affect codepaths that already
> don't work, so the risk of regressions should be very low.
>
> While preparing this patch, I also noticed that cdroms will ignore the
> backend parameter and treat everything as a file. This is a bug but I
> think it's a much less important one to address this late in the
> release cycle.
> ---
> tools/libxl/libxl_dm.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
> index b25b574..10f3090 100644
> --- a/tools/libxl/libxl_dm.c
> +++ b/tools/libxl/libxl_dm.c
> @@ -797,11 +797,14 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
> continue;
> }
>
> - if (disks[i].backend == LIBXL_DISK_BACKEND_TAP)
> + if (disks[i].backend == LIBXL_DISK_BACKEND_TAP) {
> + format = qemu_disk_format_string(LIBXL_DISK_FORMAT_RAW);
> pdev_path = libxl__blktap_devpath(gc, disks[i].pdev_path,
> disks[i].format);
> - else
> + } else {
> pdev_path = disks[i].pdev_path;
> + }
> +
>
> /*
> * Explicit sd disks are passed through as is.
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH for 4.5] libxl: Tell qemu to use raw format when using a tapdisk
2014-12-09 14:48 ` Ian Campbell
@ 2014-12-10 16:30 ` Konrad Rzeszutek Wilk
2014-12-15 16:47 ` George Dunlap
0 siblings, 1 reply; 9+ messages in thread
From: Konrad Rzeszutek Wilk @ 2014-12-10 16:30 UTC (permalink / raw)
To: Ian Campbell; +Cc: George Dunlap, Ian Jackson, Wei Liu, xen-devel
On Tue, Dec 09, 2014 at 02:48:21PM +0000, Ian Campbell wrote:
> On Tue, 2014-12-09 at 14:04 +0000, George Dunlap wrote:
> > At the moment libxl unconditinally passes the underlying file format
> > to qemu in the device string. However, when tapdisk is in use,
> > tapdisk handles the underlying format and presents qemu with
> > effectively a raw disk. When qemu looks at the tapdisk block device
> > and doesn't find the image format it was looking for, it will fail.
> >
> > This effectively means that tapdisk cannot be used with HVM domains at
> > the moment except for raw files.
> >
> > Instead, if we're using a tapdisk backend, tell qemu to use a raw file
> > format.
> >
> > Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
>
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>
> > ---
> > CC: Ian Campbell <ian.campbell@citrix.com>
> > CC: Ian Jackson <ian.jackson@citrix.com>
> > CC: Wei Liu <wei.liu2@citrix.com>
> > CC: Konrad Wilk <konrad.wilk@oracle.com>
> >
> > Release exception justification:
>
> I agree with your reasoning.
>
> > This fixes a bug in functionality, in
> > that at the moment HVM guests cannot boot with tapdisk and vhd format.
> >
> > This is not a regression in xl functionality per se, since (AFAICT)
> > this has never worked. However, given that 4.5 is the first release
> > without xend, this *does* represent a regression in functionality for
> > Xen as a whole (since before people using hvm guest with vhd on blktap
> > could use xend).
> >
> > The fix is very simple and should only affect codepaths that already
> > don't work, so the risk of regressions should be very low.
> >
> > While preparing this patch, I also noticed that cdroms will ignore the
> > backend parameter and treat everything as a file. This is a bug but I
> > think it's a much less important one to address this late in the
> > release cycle.
> > ---
> > tools/libxl/libxl_dm.c | 7 +++++--
> > 1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
> > index b25b574..10f3090 100644
> > --- a/tools/libxl/libxl_dm.c
> > +++ b/tools/libxl/libxl_dm.c
> > @@ -797,11 +797,14 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
> > continue;
> > }
> >
> > - if (disks[i].backend == LIBXL_DISK_BACKEND_TAP)
> > + if (disks[i].backend == LIBXL_DISK_BACKEND_TAP) {
> > + format = qemu_disk_format_string(LIBXL_DISK_FORMAT_RAW);
> > pdev_path = libxl__blktap_devpath(gc, disks[i].pdev_path,
> > disks[i].format);
> > - else
> > + } else {
> > pdev_path = disks[i].pdev_path;
> > + }
> > +
> >
> > /*
> > * Explicit sd disks are passed through as is.
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH for 4.5] libxl: Tell qemu to use raw format when using a tapdisk
2014-12-10 16:30 ` Konrad Rzeszutek Wilk
@ 2014-12-15 16:47 ` George Dunlap
2014-12-16 17:19 ` Ian Campbell
0 siblings, 1 reply; 9+ messages in thread
From: George Dunlap @ 2014-12-15 16:47 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk
Cc: Ian Jackson, Wei Liu, Ian Campbell, xen-devel@lists.xen.org
On Wed, Dec 10, 2014 at 4:30 PM, Konrad Rzeszutek Wilk
<konrad.wilk@oracle.com> wrote:
> On Tue, Dec 09, 2014 at 02:48:21PM +0000, Ian Campbell wrote:
>> On Tue, 2014-12-09 at 14:04 +0000, George Dunlap wrote:
>> > At the moment libxl unconditinally passes the underlying file format
>> > to qemu in the device string. However, when tapdisk is in use,
>> > tapdisk handles the underlying format and presents qemu with
>> > effectively a raw disk. When qemu looks at the tapdisk block device
>> > and doesn't find the image format it was looking for, it will fail.
>> >
>> > This effectively means that tapdisk cannot be used with HVM domains at
>> > the moment except for raw files.
>> >
>> > Instead, if we're using a tapdisk backend, tell qemu to use a raw file
>> > format.
>> >
>> > Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
>>
>> Acked-by: Ian Campbell <ian.campbell@citrix.com>
>
> Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This doesn't seem to have been applied yet.
-George
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH for 4.5] libxl: Tell qemu to use raw format when using a tapdisk
2014-12-15 16:47 ` George Dunlap
@ 2014-12-16 17:19 ` Ian Campbell
0 siblings, 0 replies; 9+ messages in thread
From: Ian Campbell @ 2014-12-16 17:19 UTC (permalink / raw)
To: George Dunlap; +Cc: Ian Jackson, xen-devel@lists.xen.org, Wei Liu
On Mon, 2014-12-15 at 16:47 +0000, George Dunlap wrote:
> On Wed, Dec 10, 2014 at 4:30 PM, Konrad Rzeszutek Wilk
> <konrad.wilk@oracle.com> wrote:
> > On Tue, Dec 09, 2014 at 02:48:21PM +0000, Ian Campbell wrote:
> >> On Tue, 2014-12-09 at 14:04 +0000, George Dunlap wrote:
> >> > At the moment libxl unconditinally passes the underlying file format
> >> > to qemu in the device string. However, when tapdisk is in use,
> >> > tapdisk handles the underlying format and presents qemu with
> >> > effectively a raw disk. When qemu looks at the tapdisk block device
> >> > and doesn't find the image format it was looking for, it will fail.
> >> >
> >> > This effectively means that tapdisk cannot be used with HVM domains at
> >> > the moment except for raw files.
> >> >
> >> > Instead, if we're using a tapdisk backend, tell qemu to use a raw file
> >> > format.
> >> >
> >> > Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
> >>
> >> Acked-by: Ian Campbell <ian.campbell@citrix.com>
> >
> > Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>
> This doesn't seem to have been applied yet.
Now applied, nuking the extra blank line which way noticed on the way.
Ian.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH for 4.5] libxl: Tell qemu to use raw format when using a tapdisk
2014-12-09 14:04 [PATCH for 4.5] libxl: Tell qemu to use raw format when using a tapdisk George Dunlap
2014-12-09 14:32 ` Wei Liu
2014-12-09 14:48 ` Ian Campbell
@ 2014-12-15 15:29 ` Wei Liu
[not found] ` <20141215154710.GC8049@zion.uk.xensource.com>
3 siblings, 0 replies; 9+ messages in thread
From: Wei Liu @ 2014-12-15 15:29 UTC (permalink / raw)
To: George Dunlap; +Cc: Ian Jackson, Wei Liu, Ian Campbell, xen-devel
On Tue, Dec 09, 2014 at 02:04:19PM +0000, George Dunlap wrote:
[...]
> While preparing this patch, I also noticed that cdroms will ignore the
> backend parameter and treat everything as a file. This is a bug
create !
title it CDROM's backend ignored and always treated as file
thanks
^ permalink raw reply [flat|nested] 9+ messages in thread[parent not found: <20141215154710.GC8049@zion.uk.xensource.com>]
end of thread, other threads:[~2014-12-16 17:19 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-09 14:04 [PATCH for 4.5] libxl: Tell qemu to use raw format when using a tapdisk George Dunlap
2014-12-09 14:32 ` Wei Liu
2014-12-09 14:34 ` George Dunlap
2014-12-09 14:48 ` Ian Campbell
2014-12-10 16:30 ` Konrad Rzeszutek Wilk
2014-12-15 16:47 ` George Dunlap
2014-12-16 17:19 ` Ian Campbell
2014-12-15 15:29 ` Wei Liu
[not found] ` <20141215154710.GC8049@zion.uk.xensource.com>
2014-12-15 16:00 ` Processed: " xen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.