* [PATCH] MD: not clear ->safemode for external metadata array
@ 2017-08-12 3:39 Shaohua Li
2017-08-13 23:11 ` NeilBrown
0 siblings, 1 reply; 2+ messages in thread
From: Shaohua Li @ 2017-08-12 3:39 UTC (permalink / raw)
To: linux-raid; +Cc: Shaohua Li, NeilBrown
From: Shaohua Li <shli@fb.com>
->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>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] MD: not clear ->safemode for external metadata array
2017-08-12 3:39 [PATCH] MD: not clear ->safemode for external metadata array Shaohua Li
@ 2017-08-13 23:11 ` NeilBrown
0 siblings, 0 replies; 2+ messages in thread
From: NeilBrown @ 2017-08-13 23:11 UTC (permalink / raw)
To: Shaohua Li, linux-raid
[-- Attachment #1: Type: text/plain, Size: 1139 bytes --]
On Fri, Aug 11 2017, Shaohua Li wrote:
> From: Shaohua Li <shli@fb.com>
>
> ->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>
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@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-13 23:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-12 3:39 [PATCH] MD: not clear ->safemode for external metadata array Shaohua Li
2017-08-13 23:11 ` NeilBrown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).