* [Qemu-devel] [PATCH] block/iscsi: Drop iscsi_co_get_block_status for older versions of libiscsi
@ 2013-09-17 17:33 Stefan Weil
2013-09-17 23:29 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2013-09-17 17:33 UTC (permalink / raw
To: qemu-devel; +Cc: Kevin Wolf, Paolo Bonzini, Stefan Hajnoczi, Stefan Weil
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>
---
block/iscsi.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/block/iscsi.c b/block/iscsi.c
index b6b47c6..4460382 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)
@@ -1524,7 +1528,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.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] block/iscsi: Drop iscsi_co_get_block_status for older versions of libiscsi
2013-09-17 17:33 [Qemu-devel] [PATCH] block/iscsi: Drop iscsi_co_get_block_status for older versions of libiscsi Stefan Weil
@ 2013-09-17 23:29 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2013-09-17 23:29 UTC (permalink / raw
To: Stefan Weil; +Cc: Kevin Wolf, qemu-devel, Stefan Hajnoczi
Il 17/09/2013 19:33, Stefan Weil ha scritto:
> 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>
> ---
> block/iscsi.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/block/iscsi.c b/block/iscsi.c
> index b6b47c6..4460382 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)
> @@ -1524,7 +1528,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,
>
Applied to scsi-next branch, thanks.
Paolo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-17 23:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-17 17:33 [Qemu-devel] [PATCH] block/iscsi: Drop iscsi_co_get_block_status for older versions of libiscsi Stefan Weil
2013-09-17 23:29 ` Paolo Bonzini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.