Commit 6a280cd1 authored by Shaohua Li's avatar Shaohua Li Committed by Greg Kroah-Hartman

MD: not clear ->safemode for external metadata array

commit afc1f55c upstream.

->safemode should be triggered by mdadm for external metadaa array, otherwise
array's state confuses mdadm.

Fixes: 33182d15(md: always clear ->safemode when md_check_recovery gets the mddev lock.)
Cc: NeilBrown <neilb@suse.com>
Signed-off-by: default avatarShaohua Li <shli@fb.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7987c406
...@@ -8639,7 +8639,7 @@ void md_check_recovery(struct mddev *mddev) ...@@ -8639,7 +8639,7 @@ void md_check_recovery(struct mddev *mddev)
if (mddev_trylock(mddev)) { if (mddev_trylock(mddev)) {
int spares = 0; int spares = 0;
if (mddev->safemode == 1) if (!mddev->external && mddev->safemode == 1)
mddev->safemode = 0; mddev->safemode = 0;
if (mddev->ro) { if (mddev->ro) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment