From: NeilBrown Date: Wed, 11 May 2011 04:26:30 +0000 (+1000) Subject: md/bitmap: fix saving of events_cleared and other state. X-Git-Tag: v2.6.39.1~76 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6b2de6dae30c9565999760b91d1c22f77613c9d;p=pandora-kernel.git md/bitmap: fix saving of events_cleared and other state. commit 8258c53208d7a9b7207e7d4dae36d2ea384cb278 upstream. If a bitmap is found to be 'stale' the events_cleared value is set to match 'events'. However if the array is degraded this does not get stored on disk. This can subsequently lead to incorrect behaviour. So change bitmap_update_sb to always update events_cleared in the superblock from the known events_cleared. For neatness also set ->state from ->flags. This requires updating ->state whenever we update ->flags, which makes sense anyway. This is suitable for any active -stable release. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed