From nobody Sun Nov 9 23:02:27 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1552118060685213.09125910769797; Fri, 8 Mar 2019 23:54:20 -0800 (PST) Received: from localhost ([127.0.0.1]:55317 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2WoC-0007vB-LE for importer@patchew.org; Sat, 09 Mar 2019 02:54:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2Wic-0003qj-6k for qemu-devel@nongnu.org; Sat, 09 Mar 2019 02:48:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h2Wia-0000Qe-AN for qemu-devel@nongnu.org; Sat, 09 Mar 2019 02:48:30 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:55316) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h2WiY-0000M2-Ci for qemu-devel@nongnu.org; Sat, 09 Mar 2019 02:48:27 -0500 Received: by mail-wm1-x335.google.com with SMTP id q187so14583757wme.5 for ; Fri, 08 Mar 2019 23:48:24 -0800 (PST) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id 11sm5252294wmg.27.2019.03.08.23.48.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Mar 2019 23:48:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AU8ultyrv17wvuIcnzZd3UcpLg2rpRKoFS5qpal8H18=; b=oST2Ndnh8I/cHqtjpCggiH2Rog8Jisnyag+YNFAA/pHwiPkdzaLah3j6Y/igqaXc1H w0BwiR592E0NRXdms8IIosGQV1eMRkfF20/RSuh9ygFwkwvO0fOHQuRL1Vlpd65oBMIX gZx+u0ihQMw4FiQzLUayJQxciOdT1vcfFmG2wl+6ulhpRrvvxfawOu/Kb1feHgIs8EVd wp9HcY/9eL8WhJoUZUf56Z1asrO8yhl3gHa4dkAhO8+T2ThBV9MibsgGS86twdHRA0iz mG12aZFAng04JwY1FV79dQUCHJjJrtGl178ZCQ1yWnoi6n0t/RCwTaYbLUPEUfzq/mir IbWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=AU8ultyrv17wvuIcnzZd3UcpLg2rpRKoFS5qpal8H18=; b=kselsKKo09Ye8TaQlJqRvwC4C28ln9Ey7xgUo6cXMn0Bq3gOktObXDueEM/LLmXYT0 yVqCJEZS2vQz7bpcWxfOsblb7k1jccjgOVhSrzoe0Y3sPxZJrTWl/BOoVX2/afxp/MlY k22OQeKzDIjaA2sEUtjH4hhNhX+7Fe7KoC31mjN7oinX669bczfNKeZBJv3/Aed2a/bw xMgeALOLYQA/HHJScMhtmz+mbnwaxjzfUgayngTrZiSE00BMnAWlDOS0ZMQAjj5MUMv4 S+BcOfjIxRiQpU2w+xelTmrxKL2YgWfScMyYSRV25cuevGMsAYR5divHNb7eeZX9qnOL Ja0A== X-Gm-Message-State: APjAAAXZC4jupDtIFltTaRh8mHN0rYqKX8KLekgKOMNny0N0H/1jgzzF mTcWbSCSfyLfmLuI3pTpTQG5gcyk X-Google-Smtp-Source: APXvYqy9UCf5wQTcL/2IXUOW/tnKDa5ByPEArTz+hRuBi3sUq1a97JCqans3WaIocWWAfwymCPJf/g== X-Received: by 2002:a7b:c017:: with SMTP id c23mr11220520wmb.50.1552117703358; Fri, 08 Mar 2019 23:48:23 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Sat, 9 Mar 2019 08:47:57 +0100 Message-Id: <1552117698-12355-5-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1552117698-12355-1-git-send-email-pbonzini@redhat.com> References: <1552117698-12355-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::335 Subject: [Qemu-devel] [PULL 04/25] block/iscsi: Restrict Linux-specific code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Some Linux specific code is missing guards, leading to build failure on OSX: $ sudo brew install libiscsi $ ./configure && make [...] CC block/iscsi.o qemu/block/iscsi.c:338:24: error: 'iscsi_aiocb_info' defined but not used= [-Werror=3Dunused-const-variable=3D] static const AIOCBInfo iscsi_aiocb_info =3D { ^~~~~~~~~~~~~~~~ qemu/block/iscsi.c:168:1: error: 'iscsi_schedule_bh' defined but not used= [-Werror=3Dunused-function] iscsi_schedule_bh(IscsiAIOCB *acb) ^~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Add guards to restrict this code for Linux. Signed-off-by: Philippe Mathieu-Daud=C3=83=C2=A9 Message-Id: <20190220000553.28438-1-philmd@redhat.com> Signed-off-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- block/iscsi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index a0c0084..f31c612 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -145,6 +145,8 @@ static const unsigned iscsi_retry_times[] =3D {8, 32, 1= 28, 512, 2048, 8192, 32768} * unallocated. */ #define ISCSI_CHECKALLOC_THRES 64 =20 +#ifdef __linux__ + static void iscsi_bh_cb(void *p) { @@ -172,6 +174,8 @@ iscsi_schedule_bh(IscsiAIOCB *acb) qemu_bh_schedule(acb->bh); } =20 +#endif + static void iscsi_co_generic_bh_cb(void *opaque) { struct IscsiTask *iTask =3D opaque; @@ -290,6 +294,8 @@ static void iscsi_co_init_iscsitask(IscsiLun *iscsilun,= struct IscsiTask *iTask) }; } =20 +#ifdef __linux__ + /* Called (via iscsi_service) with QemuMutex held. */ static void iscsi_abort_task_cb(struct iscsi_context *iscsi, int status, void *command= _data, @@ -338,6 +344,7 @@ static const AIOCBInfo iscsi_aiocb_info =3D { .cancel_async =3D iscsi_aio_cancel, }; =20 +#endif =20 static void iscsi_process_read(void *arg); static void iscsi_process_write(void *arg); --=20 1.8.3.1