On Fri, Aug 11 2017, Shaohua Li wrote: > From: Shaohua Li <shli@xxxxxx> > > ->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@xxxxxxxx> > Signed-off-by: Shaohua Li <shli@xxxxxx> Yes, of course. Thanks! NeilBrown > --- > drivers/md/md.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/md/md.c b/drivers/md/md.c > index f8840ef1aafd..a74dc9963822 100644 > --- a/drivers/md/md.c > +++ b/drivers/md/md.c > @@ -8658,7 +8658,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) { > -- > 2.11.0 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-raid" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html
Attachment:
signature.asc
Description: PGP signature