* [Qemu-devel] [PATCH] block/iscsi: reenable iscsi_co_get_block_status
@ 2013-10-02 11:52 Peter Lieven
2013-10-02 11:58 ` Paolo Bonzini
2013-10-02 17:07 ` Stefan Weil
0 siblings, 2 replies; 3+ messages in thread
From: Peter Lieven @ 2013-10-02 11:52 UTC (permalink / raw)
To: qemu-devel
Cc: kwolf, ronniesahlberg, sw, stefanha, anthony, pbonzini,
Peter Lieven
Commit f35c934a accidently disabled iscsi_co_get_block_status for all
libiscsi versions. Its not possible to check for enumeration constants
in the C preprocessor. This patch changes the check to the preprocessor
constant LIBISCSI_FEATURE_IOVECTOR which was introduced shortly after
get_lba_status support was added to libiscsi.
Signed-off-by: Peter Lieven <pl@kamp.de>
---
block/iscsi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/block/iscsi.c b/block/iscsi.c
index 6152ef1..a2a961e 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -811,7 +811,7 @@ iscsi_getlength(BlockDriverState *bs)
return len;
}
-#if defined(SCSI_PROVISIONING_TYPE_DEALLOCATED)
+#if defined(LIBISCSI_FEATURE_IOVECTOR)
static int64_t coroutine_fn iscsi_co_get_block_status(BlockDriverState *bs,
int64_t sector_num,
@@ -903,7 +903,7 @@ out:
return ret;
}
-#endif /* SCSI_PROVISIONING_TYPE_DEALLOCATED */
+#endif /* LIBISCSI_FEATURE_IOVECTOR */
static int
coroutine_fn iscsi_co_discard(BlockDriverState *bs, int64_t sector_num,
@@ -1529,7 +1529,7 @@ static BlockDriver bdrv_iscsi = {
.bdrv_getlength = iscsi_getlength,
.bdrv_truncate = iscsi_truncate,
-#if defined(SCSI_PROVISIONING_TYPE_DEALLOCATED)
+#if defined(LIBISCSI_FEATURE_IOVECTOR)
.bdrv_co_get_block_status = iscsi_co_get_block_status,
#endif
.bdrv_co_discard = iscsi_co_discard,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] block/iscsi: reenable iscsi_co_get_block_status
2013-10-02 11:52 [Qemu-devel] [PATCH] block/iscsi: reenable iscsi_co_get_block_status Peter Lieven
@ 2013-10-02 11:58 ` Paolo Bonzini
2013-10-02 17:07 ` Stefan Weil
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2013-10-02 11:58 UTC (permalink / raw)
To: Peter Lieven; +Cc: kwolf, ronniesahlberg, sw, stefanha, qemu-devel, anthony
Il 02/10/2013 13:52, Peter Lieven ha scritto:
> Commit f35c934a accidently disabled iscsi_co_get_block_status for all
> libiscsi versions. Its not possible to check for enumeration constants
> in the C preprocessor. This patch changes the check to the preprocessor
> constant LIBISCSI_FEATURE_IOVECTOR which was introduced shortly after
> get_lba_status support was added to libiscsi.
>
> Signed-off-by: Peter Lieven <pl@kamp.de>
> ---
> block/iscsi.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/block/iscsi.c b/block/iscsi.c
> index 6152ef1..a2a961e 100644
> --- a/block/iscsi.c
> +++ b/block/iscsi.c
> @@ -811,7 +811,7 @@ iscsi_getlength(BlockDriverState *bs)
> return len;
> }
>
> -#if defined(SCSI_PROVISIONING_TYPE_DEALLOCATED)
> +#if defined(LIBISCSI_FEATURE_IOVECTOR)
>
> static int64_t coroutine_fn iscsi_co_get_block_status(BlockDriverState *bs,
> int64_t sector_num,
> @@ -903,7 +903,7 @@ out:
> return ret;
> }
>
> -#endif /* SCSI_PROVISIONING_TYPE_DEALLOCATED */
> +#endif /* LIBISCSI_FEATURE_IOVECTOR */
>
> static int
> coroutine_fn iscsi_co_discard(BlockDriverState *bs, int64_t sector_num,
> @@ -1529,7 +1529,7 @@ static BlockDriver bdrv_iscsi = {
> .bdrv_getlength = iscsi_getlength,
> .bdrv_truncate = iscsi_truncate,
>
> -#if defined(SCSI_PROVISIONING_TYPE_DEALLOCATED)
> +#if defined(LIBISCSI_FEATURE_IOVECTOR)
> .bdrv_co_get_block_status = iscsi_co_get_block_status,
> #endif
> .bdrv_co_discard = iscsi_co_discard,
>
Oops.
Thanks,
Paolo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] block/iscsi: reenable iscsi_co_get_block_status
2013-10-02 11:52 [Qemu-devel] [PATCH] block/iscsi: reenable iscsi_co_get_block_status Peter Lieven
2013-10-02 11:58 ` Paolo Bonzini
@ 2013-10-02 17:07 ` Stefan Weil
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Weil @ 2013-10-02 17:07 UTC (permalink / raw)
To: Peter Lieven, qemu-devel
Cc: kwolf, pbonzini, anthony, ronniesahlberg, stefanha
Am 02.10.2013 13:52, schrieb Peter Lieven:
> Commit f35c934a accidently disabled iscsi_co_get_block_status for all
> libiscsi versions. Its not possible to check for enumeration constants
> in the C preprocessor. This patch changes the check to the preprocessor
> constant LIBISCSI_FEATURE_IOVECTOR which was introduced shortly after
> get_lba_status support was added to libiscsi.
>
> Signed-off-by: Peter Lieven <pl@kamp.de>
> ---
> block/iscsi.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/block/iscsi.c b/block/iscsi.c
> index 6152ef1..a2a961e 100644
> --- a/block/iscsi.c
> +++ b/block/iscsi.c
> @@ -811,7 +811,7 @@ iscsi_getlength(BlockDriverState *bs)
> return len;
> }
>
> -#if defined(SCSI_PROVISIONING_TYPE_DEALLOCATED)
> +#if defined(LIBISCSI_FEATURE_IOVECTOR)
>
> static int64_t coroutine_fn iscsi_co_get_block_status(BlockDriverState *bs,
> int64_t sector_num,
> @@ -903,7 +903,7 @@ out:
> return ret;
> }
>
> -#endif /* SCSI_PROVISIONING_TYPE_DEALLOCATED */
> +#endif /* LIBISCSI_FEATURE_IOVECTOR */
>
> static int
> coroutine_fn iscsi_co_discard(BlockDriverState *bs, int64_t sector_num,
> @@ -1529,7 +1529,7 @@ static BlockDriver bdrv_iscsi = {
> .bdrv_getlength = iscsi_getlength,
> .bdrv_truncate = iscsi_truncate,
>
> -#if defined(SCSI_PROVISIONING_TYPE_DEALLOCATED)
> +#if defined(LIBISCSI_FEATURE_IOVECTOR)
> .bdrv_co_get_block_status = iscsi_co_get_block_status,
> #endif
> .bdrv_co_discard = iscsi_co_discard,
Reviewed-by: Stefan Weil <sw@weilnetz.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-02 17:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-02 11:52 [Qemu-devel] [PATCH] block/iscsi: reenable iscsi_co_get_block_status Peter Lieven
2013-10-02 11:58 ` Paolo Bonzini
2013-10-02 17:07 ` Stefan Weil
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).