diff options
author | Stefan Weil <sw@weilnetz.de> | 2013-09-17 19:33:49 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-09-18 01:28:50 +0200 |
commit | f35c934a5add17eb549e3f7f4b8286605eb21e99 (patch) | |
tree | 555abbcd362a93876e76e0ecd017969033c0a566 | |
parent | ceae18bd74e8940ff79935a257c72e665b084bcc (diff) |
block/iscsi: Drop iscsi_co_get_block_status for older versions of libiscsi
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>
-rw-r--r-- | block/iscsi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/block/iscsi.c b/block/iscsi.c index 68f99d3195..6222ea9d47 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, |