Skip to contentSkip to conversation

libxl: prefer qdisk for <driver name='file'>

PATCH In review Jim Fehlig 3 participants 6 messages Jun 20, 2014 – Jun 25, 2014 2 messages not in the archive

lore
Share & tools
lore

Jim Fehlig

author
#0 lore raw

PATCH 1/1 libxl: prefer qdisk for <driver name='file'>

The libxl driver currently sets the disk backend to LIBXL_DISK_BACKEND_TAP when <driver name='file'> is specified in the <disk> config. qdisk should be prefered with this configuration, otherwise existing configuration such as the following, which worked with the old Xen driver, will not work with the libxl driver

<disk type='file' device='cdrom'>

    <driver name='file'/>
    <source file='/path/to/some/iso'/>
    <target dev='hdc' bus='ide'/>
    <readonly/>

</disk>

In addition, tap performs poorly compared to qdisk.

---
 src/libxl/libxl_conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/libxl/libxl_conf.c +1 -1
index fdbb522..4b6b5c0 100644
@@ -796,7 +796,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk)
                 return -1;
             }
             x_disk->format = LIBXL_DISK_FORMAT_RAW;
-            x_disk->backend = LIBXL_DISK_BACKEND_TAP;
+            x_disk->backend = LIBXL_DISK_BACKEND_QDISK;
         } else if (STREQ(driver, "phy")) {
             if (format != VIR_STORAGE_FILE_NONE &&
                 format != VIR_STORAGE_FILE_RAW) {
Signature · 1 line
1.8.4.5
Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines · Jim Fehlig

The libxl driver currently sets the disk backend to LIBXL_DISK_BACKEND_TAP when <driver name='file'> is specified in the <disk> config. qdisk should be prefered with this configuration, otherwise existing configuration such as the following, which worked with the old Xen driver, will not work with the libxl driver

<disk type='file' device='cdrom'>

    <driver name='file'/>
    <source file='/path/to/some/iso'/>
    <target dev='hdc' bus='ide'/>
    <readonly/>
Quoted 5 lines

</disk>

In addition, tap performs poorly compared to qdisk.

Quoted 25 lines
 src/libxl/libxl_conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/libxl/libxl_conf.c +1 -1
index fdbb522..4b6b5c0 100644
@@ -796,7 +796,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk)
                 return -1;
             }
             x_disk->format = LIBXL_DISK_FORMAT_RAW;
-            x_disk->backend = LIBXL_DISK_BACKEND_TAP;
+            x_disk->backend = LIBXL_DISK_BACKEND_QDISK;
         } else if (STREQ(driver, "phy")) {
             if (format != VIR_STORAGE_FILE_NONE &&
                 format != VIR_STORAGE_FILE_RAW) {
Signature · 7 lines
1.8.4.5


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#3 lore raw
Quoted 16 lines · Stefano Stabellini
Quoted 14 lines · Jim Fehlig

The libxl driver currently sets the disk backend to LIBXL_DISK_BACKEND_TAP when <driver name='file'> is specified in the <disk> config. qdisk should be prefered with this configuration, otherwise existing configuration such as the following, which worked with the old Xen driver, will not work with the libxl driver

<disk type='file' device='cdrom'>

    <driver name='file'/>
    <source file='/path/to/some/iso'/>
    <target dev='hdc' bus='ide'/>
    <readonly/>

</disk>

Quoted 7 lines
Quoted 4 lines

In addition, tap performs poorly compared to qdisk.

Thanks Stefano. This is a change that needed blessing from one of the Xen tools devs IMO. I've pushed the patch.

Regards,
Jim

#4 lore raw
In reply to Jim Fehlig
Quoted 6 lines · Jim Fehlig

The libxl driver currently sets the disk backend to LIBXL_DISK_BACKEND_TAP when <driver name='file'> is specified in the <disk> config. qdisk should be prefered with this configuration, otherwise existing configuration such as the following, which worked with the old Xen driver, will not work with the libxl driver

OOI why not let libxl pick the most appropriate backend for (most of) these alternatives?

Quoted 28 lines

<disk type='file' device='cdrom'>

    <driver name='file'/>
    <source file='/path/to/some/iso'/>
    <target dev='hdc' bus='ide'/>
    <readonly/>

</disk>

In addition, tap performs poorly compared to qdisk.

---
 src/libxl/libxl_conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/libxl/libxl_conf.c +1 -1
index fdbb522..4b6b5c0 100644
@@ -796,7 +796,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk)
                 return -1;
             }
             x_disk->format = LIBXL_DISK_FORMAT_RAW;
-            x_disk->backend = LIBXL_DISK_BACKEND_TAP;
+            x_disk->backend = LIBXL_DISK_BACKEND_QDISK;
         } else if (STREQ(driver, "phy")) {
             if (format != VIR_STORAGE_FILE_NONE &&
                 format != VIR_STORAGE_FILE_RAW) {
author
#5 lore raw
Quoted 10 lines · Ian Campbell
Quoted 7 lines · Jim Fehlig

The libxl driver currently sets the disk backend to LIBXL_DISK_BACKEND_TAP when <driver name='file'> is specified in the <disk> config. qdisk should be prefered with this configuration, otherwise existing configuration such as the following, which worked with the old Xen driver, will not work with the libxl driver

Quoted 3 lines

OOI why not let libxl pick the most appropriate backend for (most of) these alternatives?

I think the libvirt approach is to be a bit more explicit, instead of relying on hypervisor defaults that might change over time. I'm quite sure this is the approach danpb has always advocated.

Regards,
Jim

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw
Quoted 11 lines · Jim Fehlig
Quoted 10 lines · Ian Campbell
Quoted 7 lines · Jim Fehlig

The libxl driver currently sets the disk backend to LIBXL_DISK_BACKEND_TAP when <driver name='file'> is specified in the <disk> config. qdisk should be prefered with this configuration, otherwise existing configuration such as the following, which worked with the old Xen driver, will not work with the libxl driver

Quoted 7 lines
Quoted 3 lines

OOI why not let libxl pick the most appropriate backend for (most of) these alternatives?

I think the libvirt approach is to be a bit more explicit, instead of relying on hypervisor defaults that might change over time. I'm quite sure this is the approach danpb has always advocated.

I thought that policy was more for guest visible things whereas the disk backend is transparent to the guest.

But either way it's up to libvirt.

Thanks,
Ian.