MD: not clear ->safemode for external metadata array

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

Fixes: 33182d15c6bf(md: always clear ->safemode when md_check_recovery gets the mddev lock.)
Cc: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
This commit is contained in:
Shaohua Li 2017-08-11 20:34:45 -07:00
parent a9501d7421
commit afc1f55ca4
1 changed files with 1 additions and 1 deletions

View File

@ -8656,7 +8656,7 @@ void md_check_recovery(struct mddev *mddev)
if (mddev_trylock(mddev)) {
int spares = 0;
if (mddev->safemode == 1)
if (!mddev->external && mddev->safemode == 1)
mddev->safemode = 0;
if (mddev->ro) {