From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VM4hs-0003cX-Au for qemu-devel@nongnu.org; Tue, 17 Sep 2013 19:29:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VM4hm-0005qF-Oe for qemu-devel@nongnu.org; Tue, 17 Sep 2013 19:29:20 -0400 Received: from mail-ea0-x22f.google.com ([2a00:1450:4013:c01::22f]:40232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VM4hm-0005pt-Fs for qemu-devel@nongnu.org; Tue, 17 Sep 2013 19:29:14 -0400 Received: by mail-ea0-f175.google.com with SMTP id m14so3085118eaj.34 for ; Tue, 17 Sep 2013 16:29:13 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5238E5D5.6000806@redhat.com> Date: Wed, 18 Sep 2013 01:29:25 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1379439229-31944-1-git-send-email-sw@weilnetz.de> In-Reply-To: <1379439229-31944-1-git-send-email-sw@weilnetz.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] block/iscsi: Drop iscsi_co_get_block_status for older versions of libiscsi List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 > --- > 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