From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Stefan Weil <sw@weilnetz.de>
Subject: [Qemu-devel] [PULL 6/6] block/iscsi: Drop iscsi_co_get_block_status for older versions of libiscsi
Date: Fri, 20 Sep 2013 17:08:35 +0200 [thread overview]
Message-ID: <1379689715-628-7-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1379689715-628-1-git-send-email-pbonzini@redhat.com>
From: Stefan Weil <sw@weilnetz.de>
Debian wheezy includes libiscsi-dev 1.4.0 which does not provide
SCSI_PROVISIONING_TYPE_DEALLOCATED. Drop iscsi_co_get_block_status
in this case to allow compilation without errors.
Signed-off-by: Stefan Weil <sw@weilnetz.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 68f99d3..6222ea9 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -811,6 +811,8 @@ iscsi_getlength(BlockDriverState *bs)
return len;
}
+#if defined(SCSI_PROVISIONING_TYPE_DEALLOCATED)
+
static int64_t coroutine_fn iscsi_co_get_block_status(BlockDriverState *bs,
int64_t sector_num,
int nb_sectors, int *pnum)
@@ -901,6 +903,8 @@ out:
return ret;
}
+#endif /* SCSI_PROVISIONING_TYPE_DEALLOCATED */
+
static int
coroutine_fn iscsi_co_discard(BlockDriverState *bs, int64_t sector_num,
int nb_sectors)
@@ -1522,7 +1526,9 @@ static BlockDriver bdrv_iscsi = {
.bdrv_getlength = iscsi_getlength,
.bdrv_truncate = iscsi_truncate,
+#if defined(SCSI_PROVISIONING_TYPE_DEALLOCATED)
.bdrv_co_get_block_status = iscsi_co_get_block_status,
+#endif
.bdrv_co_discard = iscsi_co_discard,
.bdrv_aio_readv = iscsi_aio_readv,
--
1.8.3.1
prev parent reply other threads:[~2013-09-20 15:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-20 15:08 [Qemu-devel] [PULL build-fix 0/6] SCSI patches for 2013-09-20 Paolo Bonzini
2013-09-20 15:08 ` [Qemu-devel] [PULL 1/6] lsi: use constant name instead of its value Paolo Bonzini
2013-09-20 15:08 ` [Qemu-devel] [PULL 2/6] lsi: check ssid versus sdid only if ssid is valid Paolo Bonzini
2013-09-20 15:08 ` [Qemu-devel] [PULL 3/6] lsi: ignore write accesses to CTEST0 registers Paolo Bonzini
2013-09-20 15:08 ` [Qemu-devel] [PULL 4/6] lsi: remove todo Paolo Bonzini
2013-09-20 15:08 ` [Qemu-devel] [PULL 5/6] lsi: add 53C810 variant Paolo Bonzini
2013-09-20 15:08 ` Paolo Bonzini [this message]
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=1379689715-628-7-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
/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).