From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
qemu-block@nongnu.org, "Fam Zheng" <fam@euphon.net>,
"Murilo Opsfelder Araujo" <muriloo@linux.ibm.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Thomas Huth" <thuth@redhat.com>
Subject: [PATCH 1/2] scsi/qemu-pr-helper: Drop support for 'old' libmultipath API
Date: Mon, 5 Jun 2023 19:41:45 +0200 [thread overview]
Message-ID: <20230605174146.87440-2-philmd@linaro.org> (raw)
In-Reply-To: <20230605174146.87440-1-philmd@linaro.org>
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é <philmd@linaro.org>
---
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
mpathlibs = [libudev]
mpathpersist = not_found
-mpathpersist_new_api = false
if targetos == 'linux' and have_tools and get_option('mpath').allowed()
- mpath_test_source_new = '''
+ mpath_test_source = '''
#include <libudev.h>
#include <mpath_persist.h>
unsigned mpath_mx_alloc_len = 1024;
@@ -1111,16 +1110,6 @@ if targetos == 'linux' and have_tools and get_option('mpath').allowed()
multipath_conf = mpath_lib_init();
return 0;
}'''
- mpath_test_source_old = '''
- #include <libudev.h>
- #include <mpath_persist.h>
- unsigned mpath_mx_alloc_len = 1024;
- int logsink;
- int main(void) {
- struct udev *udev = udev_new();
- mpath_lib_init(udev);
- return 0;
- }'''
libmpathpersist = cc.find_library('mpathpersist',
required: get_option('mpath'))
if libmpathpersist.found()
@@ -1139,10 +1128,7 @@ if targetos == 'linux' and have_tools and get_option('mpath').allowed()
endforeach
if mpathlibs.length() == 0
msg = 'Dependencies missing for libmpathpersist'
- elif cc.links(mpath_test_source_new, dependencies: mpathlibs)
- mpathpersist = declare_dependency(dependencies: mpathlibs)
- mpathpersist_new_api = true
- elif cc.links(mpath_test_source_old, dependencies: mpathlibs)
+ elif cc.links(mpath_test_source, dependencies: mpathlibs)
mpathpersist = declare_dependency(dependencies: mpathlibs)
else
msg = 'Cannot detect libmpathpersist API'
@@ -2104,7 +2090,6 @@ config_host_data.set('CONFIG_GCOV', get_option('b_coverage'))
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 = udev_new();
-#ifdef CONFIG_MPATH_NEW_API
multipath_conf = mpath_lib_init();
-#else
- mpath_lib_init(udev);
-#endif
}
static int is_mpath(int fd)
--
2.38.1
next prev parent reply other threads:[~2023-06-05 17:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-05 17:41 [PATCH 0/2] scsi/qemu-pr-helper: Drop 'old' lib and use default config helpers Philippe Mathieu-Daudé
2023-06-05 17:41 ` Philippe Mathieu-Daudé [this message]
2023-06-05 17:41 ` [PATCH 2/2] scsi/qemu-pr-helper: Use defaults [get/set]_multipath_config() impl Philippe Mathieu-Daudé
2023-06-05 17:52 ` Paolo Bonzini
2023-06-05 17:43 ` [PATCH 0/2] scsi/qemu-pr-helper: Drop 'old' lib and use default config helpers Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230605174146.87440-2-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=berrange@redhat.com \
--cc=fam@euphon.net \
--cc=marcandre.lureau@redhat.com \
--cc=muriloo@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).