Message ID | 20230605174146.87440-3-philmd@linaro.org |
---|---|
State | New |
Headers | show |
Series | scsi/qemu-pr-helper: Drop 'old' lib and use default config helpers | expand |
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
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)
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(-)