* [PATCH] Don't use tapdisk for cd-roms
@ 2013-05-02 11:03 George Dunlap
2013-05-02 11:04 ` George Dunlap
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: George Dunlap @ 2013-05-02 11:03 UTC (permalink / raw)
To: xen-devel
Cc: George Dunlap, Ian Jackson, Fabio Fantoni, Stefano Stabellini,
Ian Campbell
blktap does not support the insert / eject commands, and so is not
suitable for cd-roms.
This fixes the bug where libxl uses tapdisk as a cdrom back-end, causing
subsequent eject / insert commands to fail.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
CC: Fabio Fantoni <fabio.fantoni@heliman.it>
CC: Ian Jackson <ian.jackson@citrix.com>
CC: Stefano Stabellini <stefano.stabellini@citrix.com>
CC: Ian Campbell <ian.campbell@citrix.com>
---
tools/libxl/libxl_device.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
index a826ece..a5cf446 100644
--- a/tools/libxl/libxl_device.c
+++ b/tools/libxl/libxl_device.c
@@ -178,6 +178,12 @@ static int disk_try_backend(disk_try_backend_args *a,
case LIBXL_DISK_BACKEND_TAP:
if (a->disk->script) goto bad_script;
+ if (a->disk->is_cdrom) {
+ LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Disk vdev=%s, backend tap"
+ " unsuitable for cdroms",
+ a->disk->vdev);
+ return 0;
+ }
if (!libxl__blktap_enabled(a->gc)) {
LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Disk vdev=%s, backend tap"
" unsuitable because blktap not available",
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Don't use tapdisk for cd-roms
2013-05-02 11:03 [PATCH] Don't use tapdisk for cd-roms George Dunlap
@ 2013-05-02 11:04 ` George Dunlap
2013-05-02 13:58 ` Fabio Fantoni
2013-05-02 15:19 ` Ian Jackson
2 siblings, 0 replies; 4+ messages in thread
From: George Dunlap @ 2013-05-02 11:04 UTC (permalink / raw)
To: xen-devel@lists.xen.org
Cc: Fabio Fantoni, Ian Jackson, Ian Campbell, Stefano Stabellini
On 02/05/13 12:03, George Dunlap wrote:
> blktap does not support the insert / eject commands, and so is not
> suitable for cd-roms.
>
> This fixes the bug where libxl uses tapdisk as a cdrom back-end, causing
> subsequent eject / insert commands to fail.
This is also a candidate for backport to 4.2, as the same issue is
present there.
-George
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Don't use tapdisk for cd-roms
2013-05-02 11:03 [PATCH] Don't use tapdisk for cd-roms George Dunlap
2013-05-02 11:04 ` George Dunlap
@ 2013-05-02 13:58 ` Fabio Fantoni
2013-05-02 15:19 ` Ian Jackson
2 siblings, 0 replies; 4+ messages in thread
From: Fabio Fantoni @ 2013-05-02 13:58 UTC (permalink / raw)
To: George Dunlap; +Cc: Ian Jackson, Stefano Stabellini, Ian Campbell, xen-devel
Il 02/05/2013 13:03, George Dunlap ha scritto:
> blktap does not support the insert / eject commands, and so is not
> suitable for cd-roms.
>
> This fixes the bug where libxl uses tapdisk as a cdrom back-end, causing
> subsequent eject / insert commands to fail.
>
> Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Tested-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
> CC: Fabio Fantoni <fabio.fantoni@heliman.it>
> CC: Ian Jackson <ian.jackson@citrix.com>
> CC: Stefano Stabellini <stefano.stabellini@citrix.com>
> CC: Ian Campbell <ian.campbell@citrix.com>
> ---
> tools/libxl/libxl_device.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
> index a826ece..a5cf446 100644
> --- a/tools/libxl/libxl_device.c
> +++ b/tools/libxl/libxl_device.c
> @@ -178,6 +178,12 @@ static int disk_try_backend(disk_try_backend_args *a,
> case LIBXL_DISK_BACKEND_TAP:
> if (a->disk->script) goto bad_script;
>
> + if (a->disk->is_cdrom) {
> + LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Disk vdev=%s, backend tap"
> + " unsuitable for cdroms",
> + a->disk->vdev);
> + return 0;
> + }
> if (!libxl__blktap_enabled(a->gc)) {
> LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Disk vdev=%s, backend tap"
> " unsuitable because blktap not available",
Tested with xen unstable and qemu upstream, domU windows 7 pro 64 bit
with GPLPV and it is working! :-)
Thanks! I waited cd hotswap working for a long time.
The only thing to fix it seems the help that actually shows:
xl cd-insert --help
Usage: xl [-vfN] cd-insert <Domain> <VirtualDevice> <type:path>
While the command is working removing "type:", for example:
xl cd-insert W7 hdb /mnt/vm/iso/Clonezilla.iso
is working.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Don't use tapdisk for cd-roms
2013-05-02 11:03 [PATCH] Don't use tapdisk for cd-roms George Dunlap
2013-05-02 11:04 ` George Dunlap
2013-05-02 13:58 ` Fabio Fantoni
@ 2013-05-02 15:19 ` Ian Jackson
2 siblings, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2013-05-02 15:19 UTC (permalink / raw)
To: George Dunlap
Cc: Fabio Fantoni, Ian Campbell, Stefano Stabellini,
xen-devel@lists.xen.org
George Dunlap writes ("[PATCH] Don't use tapdisk for cd-roms"):
> blktap does not support the insert / eject commands, and so is not
> suitable for cd-roms.
>
> This fixes the bug where libxl uses tapdisk as a cdrom back-end, causing
> subsequent eject / insert commands to fail.
>
> Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
> CC: Fabio Fantoni <fabio.fantoni@heliman.it>
> CC: Ian Jackson <ian.jackson@citrix.com>
> CC: Stefano Stabellini <stefano.stabellini@citrix.com>
> CC: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-02 15:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-02 11:03 [PATCH] Don't use tapdisk for cd-roms George Dunlap
2013-05-02 11:04 ` George Dunlap
2013-05-02 13:58 ` Fabio Fantoni
2013-05-02 15:19 ` Ian Jackson
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.