NeilBrown 8258c53208 md/bitmap: fix saving of events_cleared and other state.
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.

cc: stable@kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
2011-05-11 14:26:30 +10:00
..
2011-03-31 11:26:23 -03:00
2011-03-24 13:54:24 +00:00
2011-03-10 08:52:27 +01:00
2011-03-10 08:52:27 +01:00
2010-08-12 04:14:11 +01:00
2011-03-10 08:52:07 +01:00
2011-03-31 11:26:23 -03:00
2011-03-24 13:54:35 +00:00
2011-04-05 23:52:43 +02:00
2007-10-20 02:01:26 +01:00
2010-08-12 04:14:12 +01:00
2011-03-31 11:26:23 -03:00
2011-03-24 13:54:24 +00:00
2011-03-24 13:54:24 +00:00
2011-04-18 18:25:43 +10:00
2010-10-29 16:40:33 +11:00
2011-04-21 10:00:00 -07:00
2011-04-18 18:25:42 +10:00
2011-04-18 18:25:43 +10:00
2011-03-31 11:26:23 -03:00