block/iscsi: reenable iscsi_co_get_block_status
PATCH 1/1 block/iscsi: reenable iscsi_co_get_block_status
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.
--- block/iscsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
block/iscsi.c +3 -3
@@ -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,
Signature · 1 line
1.7.9.5
Il 02/10/2013 13:52, Peter Lieven ha scritto:
Quoted 35 lines
Commit
f35c934aaccidently disablediscsi_co_get_block_statusfor all libiscsi versions. Its not possible to check for enumeration constants in the C preprocessor. This patch changes the check to the preprocessor constantLIBISCSI_FEATURE_IOVECTORwhich was introduced shortly afterget_lba_statussupport was added to libiscsi.Signed-off-by Peter Lieven <[email protected]>--- block/iscsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)block/iscsi.c +2
-2@@ -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,
block/iscsi.c static BlockDriver bdrv_iscsi = { · line 1535
Quoted 8 lines
block/iscsi.c +1
-1@@ -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
Am 02.10.2013 13:52, schrieb Peter Lieven:
Quoted 34 lines
Commit
f35c934aaccidently disablediscsi_co_get_block_statusfor all libiscsi versions. Its not possible to check for enumeration constants in the C preprocessor. This patch changes the check to the preprocessor constantLIBISCSI_FEATURE_IOVECTORwhich was introduced shortly afterget_lba_statussupport was added to libiscsi.Signed-off-by Peter Lieven <[email protected]>--- block/iscsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)block/iscsi.c +2
-2@@ -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,
block/iscsi.c static BlockDriver bdrv_iscsi = { · line 1535
Quoted 8 lines
block/iscsi.c +1
-1@@ -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,