Skip to contentSkip to conversation

dmraid/lib/events libdmraid-events-isw.c

PATCH [email protected] 1 participant 1 message Nov 19, 2009 Device mapper

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/dm
Module name: dmraid
Changes by: [email protected] 2009-11-19 11:37:25

Modified files:
lib/events : libdmraid-events-isw.c

Log message:
Fix: spare LED is still in rebuilding state even after manual rebuilding has finished

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/dmraid/lib/events/libdmraid-events-isw.c.diff?cvsroot=dm&r1=1.1&r2=1.2

lib/events/libdmraid-events-isw.c +7 -5
@@ -729,7 +729,7 @@
 			      _dso_perform(lc, lib_argv + lib_argc, action);
 
 			if (!ret &&
-			    action == GET_MEMBERS)
+			    action == GET_MEMBERS) 
 				ret = _repopulate(device, (char *)OPT_STR(lc, LC_REBUILD_SET));
 		}
 
@@ -1034,14 +1034,16 @@
 		break;
 
 	case REBUILD_END:
-		if (!_lib_main('F', dev_name) ||
-		    !_lib_main('r', dev_name))
+		if (!_lib_main('F', dev_name)) {
 			syslog(LOG_NOTICE, "Rebuild of RAID set %s complete",
-			       dev_name);
-
+					dev_name);
+			_lib_main('r', dev_name); 
+		} 
+			
 		/* Turn all RAID set LEDs off anyway, since it's in-sync.*/
 		/* Used also for manual rebuild. */
 		_dev_led_all(DSO_LED_OFF, rs);
+		break;
 	}
 
 	return ret;