[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] libxl: Don't use tapdisk for cd-roms



commit c83107132f1488fc84fe804d3c81bb7c4efa4d6a
Author:     George Dunlap <george.dunlap@xxxxxxxxxxxxx>
AuthorDate: Thu May 2 12:03:09 2013 +0100
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Thu May 2 16:19:04 2013 +0100

    libxl: 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@xxxxxxxxxxxxx>
    CC: Fabio Fantoni <fabio.fantoni@xxxxxxxxxx>
    CC: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
    CC: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl_device.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

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",
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.