summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Lieven <pl@dlhnet.de>2012-11-17 16:20:28 +0100
committerDoug Goldstein <cardoe@cardoe.com>2012-12-13 15:31:59 -0600
commit136a58a09f92f57e0c2bd76e39f2115eee508c38 (patch)
treedf9c13074347371f49246b153448cad736fd581e
parentiscsi: fix deadlock during login (diff)
downloadqemu-kvm-136a58a09f92f57e0c2bd76e39f2115eee508c38.tar.gz
qemu-kvm-136a58a09f92f57e0c2bd76e39f2115eee508c38.tar.bz2
qemu-kvm-136a58a09f92f57e0c2bd76e39f2115eee508c38.zip
iscsi: do not assume device is zero initialized
Without any complex checks we can't assume that an iscsi target is initialized to zero. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> (cherry picked from commit f807ecd5741325fe0d281199ff22cdda0acb6a7a) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> (cherry picked from commit cef2566953b967f8ff79ef6305c92728a795fdac)
-rw-r--r--block/iscsi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/block/iscsi.c b/block/iscsi.c
index 1836c71b6..11fd37e64 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -955,6 +955,11 @@ static void iscsi_close(BlockDriverState *bs)
memset(iscsilun, 0, sizeof(IscsiLun));
}
+static int iscsi_has_zero_init(BlockDriverState *bs)
+{
+ return 0;
+}
+
static BlockDriver bdrv_iscsi = {
.format_name = "iscsi",
.protocol_name = "iscsi",
@@ -970,6 +975,7 @@ static BlockDriver bdrv_iscsi = {
.bdrv_aio_flush = iscsi_aio_flush,
.bdrv_aio_discard = iscsi_aio_discard,
+ .bdrv_has_zero_init = iscsi_has_zero_init,
#ifdef __linux__
.bdrv_ioctl = iscsi_ioctl,