Skip to contentSkip to conversation

multipath-tools/multipathd main.c

PATCH [email protected] 1 participant 1 message Aug 9, 2010 Device mapper

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/dm
Module name: multipath-tools
Branch: RHEL5_FC6
Changes by: [email protected] 2010-08-09 16:16:10

Modified files:
multipathd : main.c

Log message:
Fix for bz #614966

Occasionally, the kernel sends out remove uevents when the multipath device hasn't been removed. multipathd should never remove the device when it gets these events, since they are only suspposed to be generated after the device has already been removed.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/main.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.69.2.27&r2=1.69.2.28

multipathd/main.c +11 -1
@@ -299,8 +299,18 @@
 static int
 uev_remove_map (char * devname, struct vectors * vecs)
 {
+	struct multipath * mpp;
+
 	condlog(2, "%s: remove map (uevent)", devname);
-	return ev_remove_map(devname, vecs);
+
+	mpp = find_mp_by_str(vecs->mpvec, devname);
+	if (!mpp) {
+		condlog(2, "%s: devmap not registered, can't remove", devname);
+		return 0;
+	}
+	orphan_paths(vecs->pathvec, mpp);
+	remove_map(mpp, vecs, stop_waiter_thread, 1);
+	return 0;
 }
 
 int