[pve-devel] [PATCH] iscsi : qemu-img convert workaround

Alexandre Derumier aderumier at odiso.com
Tue Oct 23 14:20:25 CEST 2012


basic workaround to use qemu-img convert.

Could be polish with checking if we can open the iscsi block device before doing the convert

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 debian/patches/iscsi-qemu-img-workaround.diff |   26 +++++++++++++++++++++++++
 debian/patches/series                         |    1 +
 2 files changed, 27 insertions(+)
 create mode 100644 debian/patches/iscsi-qemu-img-workaround.diff

diff --git a/debian/patches/iscsi-qemu-img-workaround.diff b/debian/patches/iscsi-qemu-img-workaround.diff
new file mode 100644
index 0000000..3f8c582
--- /dev/null
+++ b/debian/patches/iscsi-qemu-img-workaround.diff
@@ -0,0 +1,26 @@
+diff --git a/block/iscsi.c b/block/iscsi.c
+index 0b96165..5fcf543 100644
+--- a/block/iscsi.c
++++ b/block/iscsi.c
+@@ -1056,6 +1056,12 @@ static void iscsi_close(BlockDriverState *bs)
+     memset(iscsilun, 0, sizeof(IscsiLun));
+ }
+ 
++static int iscsi_create(const char *filename, QEMUOptionParameter *options)
++{
++
++    return 1;
++}
++
+ static BlockDriver bdrv_iscsi = {
+     .format_name     = "iscsi",
+     .protocol_name   = "iscsi",
+@@ -1063,6 +1069,7 @@ static BlockDriver bdrv_iscsi = {
+     .instance_size   = sizeof(IscsiLun),
+     .bdrv_file_open  = iscsi_open,
+     .bdrv_close      = iscsi_close,
++    .bdrv_create     = iscsi_create,
+ 
+     .bdrv_getlength  = iscsi_getlength,
+ 
+
diff --git a/debian/patches/series b/debian/patches/series
index 8470f58..01bbd66 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -13,3 +13,4 @@ fix-qemu-img-snapshot-removal.patch
 move-bdrv-snapshot-find.patch
 internal-snapshot-async.patch
 savevm-live.patch
+iscsi-qemu-img-workaround.diff
-- 
1.7.10.4




More information about the pve-devel mailing list