From nobody Fri May 17 07:56:13 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1685986944; cv=none; d=zohomail.com; s=zohoarc; b=Rq/+3OzSQ+tNQwb8ODyz+8g59q7GNCuOYvq/svNuht2Sx52casE5/9XR7qkSjrJwdu5ERUksSAneKEBQE1zvK0TDFTfanHW7/itQQNgvOkMtuhvChhOt3bhKcpXRDWyQTRjpoUkcMqOhWzzUsi1erFqOIRcnJtMoh2wwV9qL30A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685986944; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=bDoCbhsufW2eRl22gg8xlV8Kc4+eIikw7TA4BupcukI=; b=kQVBkYjzoLWa2z6p2FhQ8uKMfrBWj5nlG31/peg2SNpzPPeLmIF6TUFctq0oIHFiYWOjCia8lyt+siZx6SC3LCUZi4YYiU/4ZAoozrBPpYjHcsO/hGEQTyx6Z+E3s9d9Ng7B7dLLNwe7f6KPJnllYiqdP+0RqaK9j1uPhtQe4Hs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1685986944621106.09681424773271; Mon, 5 Jun 2023 10:42:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6EDT-0007v8-FC; Mon, 05 Jun 2023 13:42:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6EDP-0007ue-6w for qemu-devel@nongnu.org; Mon, 05 Jun 2023 13:41:59 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q6EDN-0006RT-F9 for qemu-devel@nongnu.org; Mon, 05 Jun 2023 13:41:58 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-30ae5f2ac94so5165886f8f.1 for ; Mon, 05 Jun 2023 10:41:56 -0700 (PDT) Received: from localhost.localdomain ([176.187.217.157]) by smtp.gmail.com with ESMTPSA id w1-20020a5d6081000000b0030adc30e9f1sm10286897wrt.68.2023.06.05.10.41.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 05 Jun 2023 10:41:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685986915; x=1688578915; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bDoCbhsufW2eRl22gg8xlV8Kc4+eIikw7TA4BupcukI=; b=aeakblhWU69P9wRHL4KzEqhhsudA30rD8oaT6lDIvrOphR5RRoz03lyCIcuSd7sAVJ xLFi+VjkktfEOWimQ4Aknbucj3i8ZaSnhurtm/yqkJC68uVtF/KLAEB+qtVGfW4fOU1I UU2oGQHLgRbHfC5bmgAILFdCZUJI++PpJ/w3BlYVcuVvs9Axkm/M5tzEnQyiO3jN+rb6 Nirqj6dCyczSrpRJY6f0HG1tH6kuoYaDn916Vlfw/f1boI0oq4+JlPWibRWNh7b8IWT9 LN4EMLfRhpprZbgnocFDMjK0TvuNwQiMoG7IiVb5zlu2bgIMfwtjV0Tx3Gl318K7ABXa 5bEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685986915; x=1688578915; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bDoCbhsufW2eRl22gg8xlV8Kc4+eIikw7TA4BupcukI=; b=MaeH+9grNCr1Djq/xsdy7UqW4gRSuht2tYBX1HuwI9Mw1LmAFOHBsbmlOCWSeU+8u/ NURECaE06KUPUTSGdT9RTBNP8yv+PbYK9FzkVqC3DDpo5Ps9BUF5FYTCz0DKH0q9Sm3k k7+nJfDayCR57SrwK0YC195okLHd2zvICbYm5a0tB2FVj6drjeLz3AOyDquNMO/2sZ1+ FrX96E91V0HmEVhSOOlhKcOzhhvvQmYexPpY0k8eeYIOBThjv9dQfrznNkgv9b402JOd +sa1rvxR06AIlhqP9Rqax7hM8qz8cJnPFKWyvyjjrNXtDgTDMTzPtdyZf6MbD7WE1Cja 317w== X-Gm-Message-State: AC+VfDwiM922n80uJjcjYibtRLa8G/dio0w56bAI0QwKu2/YvL0kaI15 8pfzzsCHE+UpZg7XO53We8R1Ilg/TBofhNA25Jg= X-Google-Smtp-Source: ACHHUZ4AsQhlEUKKjNSlCz/Ma1JApoQ0HaStdooi6PPvU82rKObSaVuRZOY7Y/472+A+6LYoCKgCcg== X-Received: by 2002:a05:6000:1d1:b0:30a:ea8a:7a6d with SMTP id t17-20020a05600001d100b0030aea8a7a6dmr7077092wrx.16.1685986915639; Mon, 05 Jun 2023 10:41:55 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-block@nongnu.org, Fam Zheng , Murilo Opsfelder Araujo , Paolo Bonzini , Thomas Huth Subject: [PATCH 1/2] scsi/qemu-pr-helper: Drop support for 'old' libmultipath API Date: Mon, 5 Jun 2023 19:41:45 +0200 Message-Id: <20230605174146.87440-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230605174146.87440-1-philmd@linaro.org> References: <20230605174146.87440-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1685986945650100003 Commit 1b0578f5c4 ("qemu-pr-helper: Fix build on CentOS 7") added code to probe for 'old' libmultipath API on CentOS 7. However since merge commit 8c345b3e6a (June 2021) we don't build/test CentOS 7 as it felt out of our list of supported distrib versions. Therefore we can safely remove the 'old' API check (mostly reverting commit 1b0578f5c4, except the code got converted to meson in commit 6ec0e15d95 "meson: move libmpathpersist test"). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- meson.build | 19 ++----------------- scsi/qemu-pr-helper.c | 4 ---- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/meson.build b/meson.build index a61d3e9b06..8468b8e379 100644 --- a/meson.build +++ b/meson.build @@ -1092,9 +1092,8 @@ endif =20 mpathlibs =3D [libudev] mpathpersist =3D not_found -mpathpersist_new_api =3D false if targetos =3D=3D 'linux' and have_tools and get_option('mpath').allowed() - mpath_test_source_new =3D ''' + mpath_test_source =3D ''' #include #include unsigned mpath_mx_alloc_len =3D 1024; @@ -1111,16 +1110,6 @@ if targetos =3D=3D 'linux' and have_tools and get_op= tion('mpath').allowed() multipath_conf =3D mpath_lib_init(); return 0; }''' - mpath_test_source_old =3D ''' - #include - #include - unsigned mpath_mx_alloc_len =3D 1024; - int logsink; - int main(void) { - struct udev *udev =3D udev_new(); - mpath_lib_init(udev); - return 0; - }''' libmpathpersist =3D cc.find_library('mpathpersist', required: get_option('mpath')) if libmpathpersist.found() @@ -1139,10 +1128,7 @@ if targetos =3D=3D 'linux' and have_tools and get_op= tion('mpath').allowed() endforeach if mpathlibs.length() =3D=3D 0 msg =3D 'Dependencies missing for libmpathpersist' - elif cc.links(mpath_test_source_new, dependencies: mpathlibs) - mpathpersist =3D declare_dependency(dependencies: mpathlibs) - mpathpersist_new_api =3D true - elif cc.links(mpath_test_source_old, dependencies: mpathlibs) + elif cc.links(mpath_test_source, dependencies: mpathlibs) mpathpersist =3D declare_dependency(dependencies: mpathlibs) else msg =3D 'Cannot detect libmpathpersist API' @@ -2104,7 +2090,6 @@ config_host_data.set('CONFIG_GCOV', get_option('b_cov= erage')) config_host_data.set('CONFIG_LIBUDEV', libudev.found()) config_host_data.set('CONFIG_LZO', lzo.found()) config_host_data.set('CONFIG_MPATH', mpathpersist.found()) -config_host_data.set('CONFIG_MPATH_NEW_API', mpathpersist_new_api) config_host_data.set('CONFIG_BLKIO', blkio.found()) if blkio.found() config_host_data.set('CONFIG_BLKIO_VHOST_VDPA_FD', diff --git a/scsi/qemu-pr-helper.c b/scsi/qemu-pr-helper.c index a857e80c03..ae44a816e1 100644 --- a/scsi/qemu-pr-helper.c +++ b/scsi/qemu-pr-helper.c @@ -280,11 +280,7 @@ void put_multipath_config(struct config *conf) static void multipath_pr_init(void) { udev =3D udev_new(); -#ifdef CONFIG_MPATH_NEW_API multipath_conf =3D mpath_lib_init(); -#else - mpath_lib_init(udev); -#endif } =20 static int is_mpath(int fd) --=20 2.38.1 From nobody Fri May 17 07:56:13 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1685986977; cv=none; d=zohomail.com; s=zohoarc; b=T2xWP2MctqWM6ivKmMXyXfK4CHdkTPdH3d6q7tHj5taSu0pTXGdTDB0zjowNF/IYV8t1Rr06ELbvkLlzccuplO5pYv3xhemg9qCh+FX2gUh8ZnX5Taeop+TD9Xrl+dL4ZQYax5XHtEDxoIzJIywNbUCD/nB4r1xl2qjvHLLWbBY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685986977; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Pndkd4mqky/gWkS+dPo6iaUDvWqgI4SpsWKcy9JsXbc=; b=GUULnymtSHeOtMxBqCMsPCI6dURBjRm7EdoRl7nFNB/OOBJ1CL++ZSstQ8YPEEgPkcVbwLvJ86W1rNyGJzrKMlAmqfUE06cuJxj9pE6nrTj8CkxRQO83Q3vj/dBaCFGNSetLxbc8H5wqNLTm/vxPAI4mQRRH+PwJtZqfT16N/N0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1685986977453151.69312481741622; Mon, 5 Jun 2023 10:42:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6EDZ-0007wV-6r; Mon, 05 Jun 2023 13:42:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6EDU-0007vj-HD for qemu-devel@nongnu.org; Mon, 05 Jun 2023 13:42:04 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q6EDT-0006Tw-1L for qemu-devel@nongnu.org; Mon, 05 Jun 2023 13:42:04 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3f730c1253fso18835585e9.1 for ; Mon, 05 Jun 2023 10:42:02 -0700 (PDT) Received: from localhost.localdomain ([176.187.217.157]) by smtp.gmail.com with ESMTPSA id p17-20020a05600c205100b003f604ca479esm15049983wmg.3.2023.06.05.10.41.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 05 Jun 2023 10:42:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685986921; x=1688578921; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Pndkd4mqky/gWkS+dPo6iaUDvWqgI4SpsWKcy9JsXbc=; b=c/3rsR7fM8BK46xlpTdzecLZ+tkZwTk4edkTGjI1q75hceh01BS9d5VQ+HwjGcQZtV IyVliE8ATDRozNIE9Y1HwlPnwgAPO36qFDIhvE9Zfr0nICncOVVmHXI7JTznTIZ3cdi8 A5YnREk+UdoLV+bqd6KchV633JTOFMp4LdNFPnnYOB9Dwe9co5HYKoX+rWwJACDg0jHP +kbcagQpcPncR3WK6MNnOQBVrYRybMjIGb7zQvjH+3CcrZJta1sDjsm5klVSM/4vgkHU YOcjxzjxD6J6rQVef/0aZt5Rw3hjW2rYpF77OKbeLfgt4SqAW1qyg3H9755yLnZ4uM1a bKqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685986921; x=1688578921; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Pndkd4mqky/gWkS+dPo6iaUDvWqgI4SpsWKcy9JsXbc=; b=FrdM1oine5h6Fkul3AKor+gL2AaHmeDIszpZXGEGaFtiXBDmgMz/AQpWVqZqqp+H8w +aBvgHxGNyvIAAu0+HLy6VNY8kJkEGnEUfhgG3pJgybtNpHM54otzyvwMqmPTjuDoQr1 afS/Z73puJpOZC9gtXY2PBcg6d9C30C4gJqVyOTrjnWemouv6077MvfEYy4vEGpl1d08 P+GlRejHQaSUYOd/oirG/qIdNX8u+8k9/BDiiPTg+q1pMK65u5PLAJ0xwJGervDoRb+z gphD2QcxJV6tOSqfP8NmgUbu0gWkdusS8IJsSddQ1kDTK5K1B28E69C8PlDl9GUut0hI PHFw== X-Gm-Message-State: AC+VfDzpMQdSdvt1T2phHP06LQdhXdHW8JTHxti4it5D+aLEnCspkCxZ yUQG8L1FXMxGeuqVpTWKLK2mwxrjQjIOd6CnFiU= X-Google-Smtp-Source: ACHHUZ5YrdMr7Y4qvY7e3f9hzALgf8lXPy6cjggtGWMQMYtMNPRus50VOXTQLAVxh73RyqvCpVyTlg== X-Received: by 2002:a05:600c:250:b0:3f4:e9f6:1c3b with SMTP id 16-20020a05600c025000b003f4e9f61c3bmr7241621wmj.12.1685986921368; Mon, 05 Jun 2023 10:42:01 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-block@nongnu.org, Fam Zheng , Murilo Opsfelder Araujo , Paolo Bonzini , Thomas Huth Subject: [PATCH 2/2] scsi/qemu-pr-helper: Use defaults [get/set]_multipath_config() impl Date: Mon, 5 Jun 2023 19:41:46 +0200 Message-Id: <20230605174146.87440-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230605174146.87440-1-philmd@linaro.org> References: <20230605174146.87440-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1685986979586100003 Commit b3f1c8c413 ("qemu-pr-helper: use new libmultipath API") declared the two [get/set]_multipath_config() functions to satisfy the 'new' API. The library already provides an internal implementation for these helpers, exposed as weak symbols. Since our implementation doesn't provide much, we can default to the internal implementation. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- scsi/qemu-pr-helper.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/scsi/qemu-pr-helper.c b/scsi/qemu-pr-helper.c index ae44a816e1..4d64e6b53c 100644 --- a/scsi/qemu-pr-helper.c +++ b/scsi/qemu-pr-helper.c @@ -261,26 +261,14 @@ static void dm_init(void) =20 /* Variables required by libmultipath and libmpathpersist. */ QEMU_BUILD_BUG_ON(PR_HELPER_DATA_SIZE > MPATH_MAX_PARAM_LEN); -static struct config *multipath_conf; unsigned mpath_mx_alloc_len =3D PR_HELPER_DATA_SIZE; int logsink; struct udev *udev; =20 -extern struct config *get_multipath_config(void); -struct config *get_multipath_config(void) -{ - return multipath_conf; -} - -extern void put_multipath_config(struct config *conf); -void put_multipath_config(struct config *conf) -{ -} - static void multipath_pr_init(void) { udev =3D udev_new(); - multipath_conf =3D mpath_lib_init(); + mpath_lib_init(); } =20 static int is_mpath(int fd) --=20 2.38.1