* [PATCH 0/2] scsi/qemu-pr-helper: Drop 'old' lib and use default config helpers
@ 2023-06-05 17:41 Philippe Mathieu-Daudé
2023-06-05 17:41 ` [PATCH 1/2] scsi/qemu-pr-helper: Drop support for 'old' libmultipath API Philippe Mathieu-Daudé
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-06-05 17:41 UTC (permalink / raw)
To: qemu-devel
Cc: Daniel P. Berrangé, Marc-André Lureau,
Philippe Mathieu-Daudé, qemu-block, Fam Zheng,
Murilo Opsfelder Araujo, Paolo Bonzini, Thomas Huth
The 'old' lib check was added for CentOS 7 which we don't support
anymore.
We don't need to implement particular [get/set]_multipath_config()
helpers: use the defaults.
Philippe Mathieu-Daudé (2):
scsi/qemu-pr-helper: Drop support for 'old' libmultipath API
scsi/qemu-pr-helper: Use defaults [get/set]_multipath_config() impl
meson.build | 19 ++-----------------
scsi/qemu-pr-helper.c | 18 +-----------------
2 files changed, 3 insertions(+), 34 deletions(-)
--
2.38.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] scsi/qemu-pr-helper: Drop support for 'old' libmultipath API
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é
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:43 ` [PATCH 0/2] scsi/qemu-pr-helper: Drop 'old' lib and use default config helpers Philippe Mathieu-Daudé
2 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-06-05 17:41 UTC (permalink / raw)
To: qemu-devel
Cc: Daniel P. Berrangé, Marc-André Lureau,
Philippe Mathieu-Daudé, qemu-block, Fam Zheng,
Murilo Opsfelder Araujo, Paolo Bonzini, Thomas Huth
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] scsi/qemu-pr-helper: Use defaults [get/set]_multipath_config() impl
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 ` [PATCH 1/2] scsi/qemu-pr-helper: Drop support for 'old' libmultipath API Philippe Mathieu-Daudé
@ 2023-06-05 17:41 ` 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é
2 siblings, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-06-05 17:41 UTC (permalink / raw)
To: qemu-devel
Cc: Daniel P. Berrangé, Marc-André Lureau,
Philippe Mathieu-Daudé, qemu-block, Fam Zheng,
Murilo Opsfelder Araujo, Paolo Bonzini, Thomas Huth
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é <philmd@linaro.org>
---
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)
/* 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 = PR_HELPER_DATA_SIZE;
int logsink;
struct udev *udev;
-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 = udev_new();
- multipath_conf = mpath_lib_init();
+ mpath_lib_init();
}
static int is_mpath(int fd)
--
2.38.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] scsi/qemu-pr-helper: Drop 'old' lib and use default config helpers
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 ` [PATCH 1/2] scsi/qemu-pr-helper: Drop support for 'old' libmultipath API Philippe Mathieu-Daudé
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:43 ` Philippe Mathieu-Daudé
2 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-06-05 17:43 UTC (permalink / raw)
To: qemu-devel
Cc: Daniel P. Berrangé, Marc-André Lureau, qemu-block,
Fam Zheng, Murilo Opsfelder Araujo, Paolo Bonzini, Thomas Huth
On 5/6/23 19:41, Philippe Mathieu-Daudé wrote:
> The 'old' lib check was added for CentOS 7 which we don't support
> anymore.
>
> We don't need to implement particular [get/set]_multipath_config()
> helpers: use the defaults.
>
> Philippe Mathieu-Daudé (2):
> scsi/qemu-pr-helper: Drop support for 'old' libmultipath API
> scsi/qemu-pr-helper: Use defaults [get/set]_multipath_config() impl
PD: Only build-tested...
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] scsi/qemu-pr-helper: Use defaults [get/set]_multipath_config() impl
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
0 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2023-06-05 17:52 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Daniel P. Berrangé, Marc-André Lureau, qemu-block,
Fam Zheng, Murilo Opsfelder Araujo, Thomas Huth
On 6/5/23 19:41, Philippe Mathieu-Daudé wrote:
> 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.
This seems to be still needed in RHEL8, see
https://www.spinics.net/lists/dm-devel/msg49851.html (March 2022).
Queued patch 1 though, thanks.
Paolo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-06-05 17:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 1/2] scsi/qemu-pr-helper: Drop support for 'old' libmultipath API Philippe Mathieu-Daudé
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é
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).