From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Lieven <pl@kamp.de>,
aliguori@us.ibm.com, Peter Lieven <pl@dlhnet.de>
Subject: [Qemu-devel] [PATCH 3/5] iscsi: do not assume device is zero initialized
Date: Wed, 28 Nov 2012 16:21:48 +0100 [thread overview]
Message-ID: <1354116110-28651-4-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1354116110-28651-1-git-send-email-pbonzini@redhat.com>
From: Peter Lieven <pl@dlhnet.de>
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>
---
block/iscsi.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/block/iscsi.c b/block/iscsi.c
index 01340e1..c0b70b3 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,
--
1.8.0
next prev parent reply other threads:[~2012-11-28 15:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-28 15:21 [Qemu-devel] [PULL 1.3 0/5] SCSI updates for 1.3-rc2 Paolo Bonzini
2012-11-28 15:21 ` [Qemu-devel] [PATCH 1/5] iscsi: fix segfault in url parsing Paolo Bonzini
2012-11-28 15:21 ` [Qemu-devel] [PATCH 2/5] iscsi: fix deadlock during login Paolo Bonzini
2012-11-28 15:21 ` Paolo Bonzini [this message]
2012-11-28 15:21 ` [Qemu-devel] [PATCH 4/5] virtio-scsi: Fix some endian bugs with virtio-scsi Paolo Bonzini
2012-11-28 15:21 ` [Qemu-devel] [PATCH 5/5] virtio-scsi: Fix subtle (guest) endian bug Paolo Bonzini
2012-11-28 21:38 ` [Qemu-devel] [PULL 1.3 0/5] SCSI updates for 1.3-rc2 Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1354116110-28651-4-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=pl@dlhnet.de \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).