[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] tools: libxl: pass correct file to qemu if we use blktap2
commit 16529572dfa4968ef073f57ffda58f304d354ce0 Author: Wen Congyang <wency@xxxxxxxxxxxxxx> AuthorDate: Mon Sep 22 13:59:15 2014 +0800 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Mon Sep 22 15:19:04 2014 +0100 tools: libxl: pass correct file to qemu if we use blktap2 If we use blktap2, the correct file should be blktap device not the pdev_path. Signed-off-by: Wen Congyang <wency@xxxxxxxxxxxxxx> Cc: Shriram Rajagopalan <rshriram@xxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- tools/libxl/libxl_dm.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 103cbca..fbc82fd 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -718,6 +718,7 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc, libxl__device_disk_dev_number(disks[i].vdev, &disk, &part); const char *format = qemu_disk_format_string(disks[i].format); char *drive; + const char *pdev_path; if (dev_number == -1) { LIBXL__LOG(ctx, LIBXL__LOG_WARNING, "unable to determine" @@ -747,6 +748,12 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc, continue; } + if (disks[i].backend == LIBXL_DISK_BACKEND_TAP) + pdev_path = libxl__blktap_devpath(gc, disks[i].pdev_path, + disks[i].format); + else + pdev_path = disks[i].pdev_path; + /* * Explicit sd disks are passed through as is. * @@ -756,11 +763,11 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc, if (strncmp(disks[i].vdev, "sd", 2) == 0) drive = libxl__sprintf (gc, "file=%s,if=scsi,bus=0,unit=%d,format=%s,cache=writeback", - disks[i].pdev_path, disk, format); + pdev_path, disk, format); else if (disk < 4) drive = libxl__sprintf (gc, "file=%s,if=ide,index=%d,media=disk,format=%s,cache=writeback", - disks[i].pdev_path, disk, format); + pdev_path, disk, format); else continue; /* Do not emulate this disk */ } -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |