]> git.karo-electronics.de Git - mv-sheeva.git/commit
md: fix clearing of the 'changed' flags for the bad blocks list.
authorNeilBrown <neilb@suse.de>
Mon, 19 Mar 2012 01:46:41 +0000 (12:46 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 19 Mar 2012 01:46:41 +0000 (12:46 +1100)
commitd0962936bff659d20522555b517582a2715fd23f
treedc9654b2e2c7b7db2b8f2a14f829d5f807c7342e
parent61a0d80ce4ab5b4fb9ecb38f1fb19654778b71ed
md: fix clearing of the 'changed' flags for the bad blocks list.

In super_1_sync (the first hunk) we need to clear 'changed' before
checking read_seqretry(), otherwise we might race with other code
adding a bad block and so won't retry later.

In md_update_sb (the second hunk), in the case where there is no
metadata (neither persistent nor external), we treat any bad blocks as
an error.  However we need to clear the 'changed' flag before calling
md_ack_all_badblocks, else it won't do anything.

This patch is suitable for -stable release 3.0 and later.

Cc: stable@vger.kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c