mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
qemu-pr-helper: use new libmultipath API
libmultipath has recently changed its API. The new API supports multi-threaded clients better. Unfortunately there is no backwards-compatibility, so we just switch to the new one. Running QEMU compiled with the new library on the old library will likely crash, while doing the opposite will cause QEMU not to start at all (because udev, get_multipath_config and put_multipath_config are undefined). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
306526b5de
commit
b3f1c8c413
2 changed files with 24 additions and 5 deletions
|
@ -276,15 +276,26 @@ 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)
|
||||
{
|
||||
static struct udev *udev;
|
||||
|
||||
udev = udev_new();
|
||||
mpath_lib_init(udev);
|
||||
multipath_conf = mpath_lib_init();
|
||||
}
|
||||
|
||||
static int is_mpath(int fd)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue