]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
md: fix regression with re-adding devices to arrays with no metadata
authorNeilBrown <neilb@suse.de>
Tue, 11 Jan 2011 22:03:35 +0000 (09:03 +1100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Feb 2011 22:47:23 +0000 (14:47 -0800)
commitf03114dc3b5ba8d9c271046f45c17aecb0a29402
tree377a4a36986fb08f8a41e6e662205f79efc92c7f
parent44c73d2ededd2deed83d74163cf49f60910f0f95
md: fix regression with re-adding devices to arrays with no metadata

commit bf572541ab44240163eaa2d486b06f306a31d45a upstream.

Commit 1a855a0606 (2.6.37-rc4) fixed a problem where devices were
re-added when they shouldn't be but caused a regression in a less
common case that means sometimes devices cannot be re-added when they
should be.

In particular, when re-adding a device to an array without metadata
we should always access the device, but after the above commit we
didn't.

This patch sets the In_sync flag in that case so that the re-add
succeeds.

This patch is suitable for any -stable kernel to which 1a855a0606 was
applied.

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