]> git.ipfire.org Git - thirdparty/mdadm.git/commit
Subject: Make wait_for and open_dev_excl faster
authorNeilBrown <neilb@suse.de>
Tue, 25 Jun 2013 05:56:22 +0000 (15:56 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 25 Jun 2013 05:56:22 +0000 (15:56 +1000)
commit399e0b9709311bebde461c57f5622be68e15c6a0
treee00b0f607125cb1b21869aa16fc1baf23fefec7b
parent8010806baba901e6e903ba4167c0ed88bf6e1294
Subject: Make wait_for and open_dev_excl faster

When we crete or assemble an array, we wait for udev to create the
device file in /dev so that as soon as mdadm complete, the device can
be used.

This waiting is performed in multiples of 200ms, which can sometimes
be too long to wait.

So change to an exponential backoff.  Wait 1, then 2, then 4 msec etc.
Once we get to 256msec, stop backing off and continue waiting 256ms at
a time until we reach the limit which is now 4.608sec rather than 5sec
which it was before.

Ditto for open_dev_excl.

Signed-off-by: NeilBrown <neilb@suse.de>
util.c