From: NeilBrown Date: Mon, 6 Jul 2015 02:26:57 +0000 (+1000) Subject: md: close some races between setting and checking sync_action. X-Git-Tag: omap-for-v4.3/fixes-rc1~84^2~29 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=985ca973b68cac0adfa83497db231da7f99c6ed9;p=pandora-kernel.git md: close some races between setting and checking sync_action. When checking sync_action in a script, we want to be sure it is as accurate as possible. As resync/reshape etc doesn't always start immediately (a separate thread is scheduled to do it), it is best if 'action_show' checks if MD_RECOVER_NEEDED is set (which it does) and in that case reports what is likely to start soon (which it only sometimes does). So: - report 'reshape' if reshape_position suggests one might start. - set MD_RECOVERY_RECOVER in raid1_reshape(), because that is very likely to happen next. Signed-off-by: NeilBrown --- Reading git-diff-tree failed