b0ec4a42c8
Modify 0021-RHBZ-548874-add-find-multipaths.patch Modify 0022-RHBZ-557845-RHEL5-style-partitions.patch Add 0025-RHBZ-508827-update-multipathd-manpage.patch through 0101-RHBZ-631009-disable-udev-disk-rules-on-reload.patch * sync with current state of RHEL6. Next release should include a updated source tarball with most of these fixes rolled in. Add 0102-RHBZ-690828-systemd-unit-file.patch * Add Jóhann B. Guðmundsson's unit file for systemd. * Add sub-package sysvinit for SysV init script. Resolves: bz #690828
93 lines
2.5 KiB
Diff
93 lines
2.5 KiB
Diff
---
|
|
multipathd/cli_handlers.c | 2 +-
|
|
multipathd/main.c | 20 +++++++++++++-------
|
|
multipathd/main.h | 2 +-
|
|
3 files changed, 15 insertions(+), 9 deletions(-)
|
|
|
|
Index: multipath-tools/multipathd/cli_handlers.c
|
|
===================================================================
|
|
--- multipath-tools.orig/multipathd/cli_handlers.c
|
|
+++ multipath-tools/multipathd/cli_handlers.c
|
|
@@ -416,7 +416,7 @@ cli_del_path (void * v, char ** reply, i
|
|
|
|
condlog(2, "%s: remove path (operator)", param);
|
|
|
|
- return ev_remove_path(param, vecs);
|
|
+ return ev_remove_path(param, vecs, NULL);
|
|
}
|
|
|
|
int
|
|
Index: multipath-tools/multipathd/main.c
|
|
===================================================================
|
|
--- multipath-tools.orig/multipathd/main.c
|
|
+++ multipath-tools/multipathd/main.c
|
|
@@ -496,23 +496,25 @@ fail:
|
|
static int
|
|
uev_remove_path (struct sysfs_device * dev, struct vectors * vecs)
|
|
{
|
|
- int retval;
|
|
+ int retval, del_sysdev;
|
|
|
|
condlog(2, "%s: remove path (uevent)", dev->kernel);
|
|
- retval = ev_remove_path(dev->kernel, vecs);
|
|
- if (!retval)
|
|
+ retval = ev_remove_path(dev->kernel, vecs, &del_sysdev);
|
|
+ if (del_sysdev)
|
|
sysfs_device_put(dev);
|
|
|
|
return retval;
|
|
}
|
|
|
|
int
|
|
-ev_remove_path (char * devname, struct vectors * vecs)
|
|
+ev_remove_path (char * devname, struct vectors * vecs, int *del_sysdev)
|
|
{
|
|
struct multipath * mpp;
|
|
struct path * pp;
|
|
int i, retval = 0;
|
|
|
|
+ if (del_sysdev)
|
|
+ *del_sysdev = 0;
|
|
pp = find_path_by_dev(vecs->pathvec, devname);
|
|
|
|
if (!pp) {
|
|
@@ -599,6 +601,10 @@ out:
|
|
if ((i = find_slot(vecs->pathvec, (void *)pp)) != -1)
|
|
vector_del_slot(vecs->pathvec, i);
|
|
|
|
+ if (pp->sysdev)
|
|
+ sysfs_device_put(pp->sysdev);
|
|
+ else if (del_sysdev)
|
|
+ *del_sysdev = 1;
|
|
free_path(pp);
|
|
|
|
return retval;
|
|
@@ -689,11 +695,11 @@ uev_trigger (struct uevent * uev, void *
|
|
if (uev_discard(uev->devpath))
|
|
return 0;
|
|
|
|
+ lock(vecs->lock);
|
|
+
|
|
sysdev = sysfs_device_get(uev->devpath);
|
|
if(!sysdev)
|
|
- return 0;
|
|
-
|
|
- lock(vecs->lock);
|
|
+ goto out;
|
|
|
|
/*
|
|
* device map event
|
|
Index: multipath-tools/multipathd/main.h
|
|
===================================================================
|
|
--- multipath-tools.orig/multipathd/main.h
|
|
+++ multipath-tools/multipathd/main.h
|
|
@@ -5,7 +5,7 @@
|
|
|
|
int reconfigure (struct vectors *);
|
|
int ev_add_path (char *, struct vectors *);
|
|
-int ev_remove_path (char *, struct vectors *);
|
|
+int ev_remove_path (char *, struct vectors *, int *);
|
|
int ev_add_map (struct sysfs_device *, struct vectors *);
|
|
int ev_remove_map (char *, struct vectors *);
|
|
void sync_map_state (struct multipath *);
|