From: Czarnowska, Anna Date: Wed, 7 Mar 2012 12:51:30 +0000 (+0000) Subject: Reset bad flag on map update X-Git-Tag: mdadm-3.2.4~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52f07f57195229809c7b6d71ca81d2182d303058;p=thirdparty%2Fmdadm.git Reset bad flag on map update Map file may miss an entry if bad flag is not cleared on update. This happens for example when an old entry exists in map that has no mdstat counterpart and we create a new array with the same devnum. Newly created array will not appear in map if update doesnt clear bad flag. Signed-off-by: Anna Czarnowska Signed-off-by: NeilBrown --- diff --git a/mapfile.c b/mapfile.c index 0bfecd05..9e2c8936 100644 --- a/mapfile.c +++ b/mapfile.c @@ -246,6 +246,7 @@ int map_update(struct map_ent **mpp, int devnum, char *metadata, memcpy(mp->uuid, uuid, 16); free(mp->path); mp->path = path ? strdup(path) : NULL; + mp->bad = 0; break; } if (!mp)