From nobody Mon Feb 9 09:29:35 2026 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 1552324437516991.8043546424966; Mon, 11 Mar 2019 10:13:57 -0700 (PDT) Received: from localhost ([127.0.0.1]:37063 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3OUr-0004nd-D6 for importer@patchew.org; Mon, 11 Mar 2019 13:13:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3ODQ-0006wD-Fe for qemu-devel@nongnu.org; Mon, 11 Mar 2019 12:55:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3ODO-0002wJ-Kh for qemu-devel@nongnu.org; Mon, 11 Mar 2019 12:55:52 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:53902) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3ODM-0002rG-LR for qemu-devel@nongnu.org; Mon, 11 Mar 2019 12:55:48 -0400 Received: by mail-wm1-x32a.google.com with SMTP id e74so5327198wmg.3 for ; Mon, 11 Mar 2019 09:55:46 -0700 (PDT) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id e12sm6484836wrs.91.2019.03.11.09.55.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Mar 2019 09:55:44 -0700 (PDT) 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=rwjT2Kg2mtCpabPUiGcE4JLkN29GhylnXzHQM16bmss=; b=lQfH/2Eq+L1H8Y7vLnPtjF2eUM18zsdTqq8AogECTznY2FJrjDkKOKaTrGsr280hur nB/AgyQ4rGOlRu/m3nZt5l3LqAmJBE/SmlJQX7C0QsK/ICNNac6FuPjg5FuHZpuGuFqc B17nBS+hvmO9bYnIgD2SfmM79dFMS2bhPKsfizFFmdP6COyB+rCAs2Kr4MBZEOLZwKzs V9d4lc0cNGJSAhcEIIArVwJdGwy5HxBF0WeodZKwW+8Ia3/Qio8IFY1dphhG/smM+8ya sXWHH8w7d4e4wWmQAu0eDf188cdThLHQRWFaMJY0h4aOsW2qg8nKSuc6EyGG8XDgikqo GNpg== 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=rwjT2Kg2mtCpabPUiGcE4JLkN29GhylnXzHQM16bmss=; b=Ep1QUaREmbb0Zs/smPgFa4ua6DkbjxIMphlUBy5Vl+5yXd/lE9tWb5eiTi5UWqgZ+d 10drfIveQmY5ZVdQnRgaZSr034JNs94stN5bUWWxTVvi15wrJiaoAMuwzaBtkID4qwZF 5kIcM6l0uxXil0Zh/rkytGfW+mtI0wYV4NJGWrYW2j4NsDwx91R5E++0jffa9iTifwuh XOpndVjspfLrAGqogZmqDMnzCMBRl1uFTz130fyLhUq6pynwISaiKAApIKpdywWKKo0Z E1rYJPlzWlEafMkwS9mYIS00mjZUByr2pYR+YjMWmn5UNJpsnf30CM4iIPuzF8VC//q0 6wvw== X-Gm-Message-State: APjAAAVD+/XkLUY4nB5cd7mM7Kgq/nzZGseEDZx8dHG6pu9ZzFeGs7LV cW7neC4R6vldBKNlnywjKZm/e+UI X-Google-Smtp-Source: APXvYqwDfTzrROC6zc1+WFuPP0r90b9KEKWUDqXklCy43RzwjMMGGvaTleX6aouUIyastCXReKE3XA== X-Received: by 2002:a1c:228b:: with SMTP id i133mr432627wmi.105.1552323345007; Mon, 11 Mar 2019 09:55:45 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 11 Mar 2019 17:55:10 +0100 Message-Id: <1552323335-46779-7-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1552323335-46779-1-git-send-email-pbonzini@redhat.com> References: <1552323335-46779-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::32a Subject: [Qemu-devel] [PULL v2 06/31] 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=A9 Message-Id: <20190220000553.28438-1-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- 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