aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorPeter Lieven <pl@dlhnet.de>2012-11-17 16:20:28 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2012-11-28 12:51:58 +0100
commitf807ecd5741325fe0d281199ff22cdda0acb6a7a (patch)
treea0bf92d360624b2d9714a1172d40ed6abd64f897 /block
parente829b0bb054ed3389e5b22dad61875e51674e629 (diff)
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>
Diffstat (limited to 'block')
-rw-r--r--block/iscsi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/block/iscsi.c b/block/iscsi.c
index 01340e1167..c0b70b3d32 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -951,6 +951,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",
@@ -966,6 +971,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,