]> git.ipfire.org Git - people/ms/linux.git/commit
md: fix regression resulting in delays in clearing bits in a bitmap
authorNeilBrown <neilb@suse.de>
Thu, 13 Jan 2011 22:13:53 +0000 (09:13 +1100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Feb 2011 23:14:53 +0000 (15:14 -0800)
commitfbc882cceaaaa04e272225e6d4aa6322c186d48c
treeee1dfddd7ef7f59fb0e607db9689bbf185689db7
parentac954cef3547aa90f1f81bad9113c759a8d4bca0
md: fix regression resulting in delays in clearing bits in a bitmap

commit 6c9879101442b08581e8a0e3ae6b7f643a78fd63 upstream.

commit 589a594be1fb (2.6.37-rc4) fixed a problem were md_thread would
sometimes call the ->run function at a bad time.

If an error is detected during array start up after the md_thread has
been started, the md_thread is killed.  This resulted in the ->run
function being called once.  However the array may not be in a state
that it is safe to call ->run.

However the fix imposed meant that  ->run was not called on a timeout.
This means that when an array goes idle, bitmap bits do not get
cleared promptly.  While the array is busy the bits will still be
cleared when appropriate so this is not very serious.  There is no
risk to data.

Change the test so that we only avoid calling ->run when the thread
is being stopped.  This more explicitly addresses the problem situation.

This is suitable for 2.6.37-stable and any -stable kernel to which
589a594be1fb was applied.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/md.c