qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] block: iscsi build fix if LIBISCSI_FEATURE_IOVE


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] block: iscsi build fix if LIBISCSI_FEATURE_IOVECTOR is not defined
Date: Tue, 20 May 2014 10:10:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Il 19/05/2014 23:13, Jeff Cody ha scritto:
Commit b03c380 introduced the function
iscsi_allocationmap_is_allocated(), however it is only used within a
code block that is conditionally compiled.  This produces a warning
(error with -werror) of "defined but not used" for the the function, if
LIBISCSI_FEATURE_IOVECTOR is not defined.

This wraps iscsi_allocationmap_is_allocated() in the same conditional.

Signed-off-by: Jeff Cody <address@hidden>
---
 block/iscsi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/block/iscsi.c b/block/iscsi.c
index d649424..d5548fa 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -381,6 +381,7 @@ retry:
 }


+#if defined(LIBISCSI_FEATURE_IOVECTOR)
 static bool iscsi_allocationmap_is_allocated(IscsiLun *iscsilun,
                                              int64_t sector_num, int 
nb_sectors)
 {
@@ -392,6 +393,7 @@ static bool iscsi_allocationmap_is_allocated(IscsiLun 
*iscsilun,
     return !(find_next_bit(iscsilun->allocationmap, size,
                            sector_num / iscsilun->cluster_sectors) == size);
 }
+#endif


 #if defined(LIBISCSI_FEATURE_IOVECTOR)

The new #endif and the subsequent #if can be elided.

Applied to scsi-next with this change, thanks.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]