From patchwork Wed Oct 2 11:52:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Lieven X-Patchwork-Id: 279708 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E78B82C0077 for ; Wed, 2 Oct 2013 21:53:38 +1000 (EST) Received: from localhost ([::1]:35489 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRKzn-0007Uv-EC for incoming@patchwork.ozlabs.org; Wed, 02 Oct 2013 07:53:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRKzT-0007TL-Eu for qemu-devel@nongnu.org; Wed, 02 Oct 2013 07:53:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VRKzJ-0008GD-MY for qemu-devel@nongnu.org; Wed, 02 Oct 2013 07:53:15 -0400 Received: from mx.ipv6.kamp.de ([2a02:248:0:51::16]:43651 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRKzJ-0008Fz-Bt for qemu-devel@nongnu.org; Wed, 02 Oct 2013 07:53:05 -0400 Received: (qmail 9928 invoked by uid 89); 2 Oct 2013 11:53:03 -0000 Received: from [82.141.1.145] by client-16-kamp (envelope-from , uid 89) with qmail-scanner-2010/03/19-MF (clamdscan: 0.98/17926. hbedv: 8.2.12.124/7.11.105.158. spamassassin: 3.3.1. Clear:RC:1(82.141.1.145):SA:0(-1.2/5.0):. Processed in 1.128475 secs); 02 Oct 2013 11:53:03 -0000 Received: from ns.kamp-intra.net (HELO dns.kamp-intra.net) ([82.141.1.145]) by mx01.kamp.de with SMTP; 2 Oct 2013 11:53:01 -0000 X-GL_Whitelist: yes Received: from lieven-pc.kamp-intra.net (lieven-pc.kamp-intra.net [172.21.12.60]) by dns.kamp-intra.net (Postfix) with ESMTP id D3C0420688; Wed, 2 Oct 2013 13:52:01 +0200 (CEST) Received: by lieven-pc.kamp-intra.net (Postfix, from userid 1000) id 9CF525FD4C; Wed, 2 Oct 2013 13:52:12 +0200 (CEST) From: Peter Lieven To: qemu-devel@nongnu.org Date: Wed, 2 Oct 2013 13:52:08 +0200 Message-Id: <1380714728-3739-1-git-send-email-pl@kamp.de> X-Mailer: git-send-email 1.7.9.5 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a02:248:0:51::16 Cc: kwolf@redhat.com, ronniesahlberg@gmail.com, sw@weilnetz.de, stefanha@redhat.com, anthony@codemonkey.ws, pbonzini@redhat.com, Peter Lieven Subject: [Qemu-devel] [PATCH] block/iscsi: reenable iscsi_co_get_block_status X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Reviewed-by: Stefan Weil --- 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,