Skip to content

Commit 6b40847

Browse files
philmdbonzini
authored andcommitted
scsi/qemu-pr-helper: Drop support for 'old' libmultipath API
Commit 1b0578f ("qemu-pr-helper: Fix build on CentOS 7") added code to probe for 'old' libmultipath API on CentOS 7. However since merge commit 8c345b3 (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 1b0578f, except the code got converted to meson in commit 6ec0e15 "meson: move libmpathpersist test"). Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 6da5f22 commit 6b40847

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

Diff for: meson.build

+2-17
Original file line numberDiff line numberDiff line change
@@ -1092,9 +1092,8 @@ endif
10921092

10931093
mpathlibs = [libudev]
10941094
mpathpersist = not_found
1095-
mpathpersist_new_api = false
10961095
if targetos == 'linux' and have_tools and get_option('mpath').allowed()
1097-
mpath_test_source_new = '''
1096+
mpath_test_source = '''
10981097
#include <libudev.h>
10991098
#include <mpath_persist.h>
11001099
unsigned mpath_mx_alloc_len = 1024;
@@ -1111,16 +1110,6 @@ if targetos == 'linux' and have_tools and get_option('mpath').allowed()
11111110
multipath_conf = mpath_lib_init();
11121111
return 0;
11131112
}'''
1114-
mpath_test_source_old = '''
1115-
#include <libudev.h>
1116-
#include <mpath_persist.h>
1117-
unsigned mpath_mx_alloc_len = 1024;
1118-
int logsink;
1119-
int main(void) {
1120-
struct udev *udev = udev_new();
1121-
mpath_lib_init(udev);
1122-
return 0;
1123-
}'''
11241113
libmpathpersist = cc.find_library('mpathpersist',
11251114
required: get_option('mpath'))
11261115
if libmpathpersist.found()
@@ -1139,10 +1128,7 @@ if targetos == 'linux' and have_tools and get_option('mpath').allowed()
11391128
endforeach
11401129
if mpathlibs.length() == 0
11411130
msg = 'Dependencies missing for libmpathpersist'
1142-
elif cc.links(mpath_test_source_new, dependencies: mpathlibs)
1143-
mpathpersist = declare_dependency(dependencies: mpathlibs)
1144-
mpathpersist_new_api = true
1145-
elif cc.links(mpath_test_source_old, dependencies: mpathlibs)
1131+
elif cc.links(mpath_test_source, dependencies: mpathlibs)
11461132
mpathpersist = declare_dependency(dependencies: mpathlibs)
11471133
else
11481134
msg = 'Cannot detect libmpathpersist API'
@@ -2094,7 +2080,6 @@ config_host_data.set('CONFIG_GCOV', get_option('b_coverage'))
20942080
config_host_data.set('CONFIG_LIBUDEV', libudev.found())
20952081
config_host_data.set('CONFIG_LZO', lzo.found())
20962082
config_host_data.set('CONFIG_MPATH', mpathpersist.found())
2097-
config_host_data.set('CONFIG_MPATH_NEW_API', mpathpersist_new_api)
20982083
config_host_data.set('CONFIG_BLKIO', blkio.found())
20992084
if blkio.found()
21002085
config_host_data.set('CONFIG_BLKIO_VHOST_VDPA_FD',

Diff for: scsi/qemu-pr-helper.c

-4
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,7 @@ void put_multipath_config(struct config *conf)
280280
static void multipath_pr_init(void)
281281
{
282282
udev = udev_new();
283-
#ifdef CONFIG_MPATH_NEW_API
284283
multipath_conf = mpath_lib_init();
285-
#else
286-
mpath_lib_init(udev);
287-
#endif
288284
}
289285

290286
static int is_mpath(int fd)

0 commit comments

Comments
 (0)