multipath-tools/multipathd main.c
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.
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