On 9 Sep 2020, Mariusz Tkaczyk uttered the following: > + /* > + * If mdmonitor is awaken by event, set small delay once > + * to deal with udev and mdadm. > + */ > + if (wait_result != 0) { > + if (c->delay > 5) > + delay_for_event = 5; > + } else > + delay_for_event = c->delay; This is racy: if any delay is needed, any finite delay value will now and then be too short. I think this should be fixed by arranging for mdmonitor to be signalled when udev or whatever has finished whatever it's doing. (udev has lots of ways it could be asked to do that.)