From 52f07f57195229809c7b6d71ca81d2182d303058 Mon Sep 17 00:00:00 2001 From: "Czarnowska, Anna" Date: Wed, 7 Mar 2012 12:51:30 +0000 Subject: [PATCH] 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 --- mapfile.c | 1 + 1 file changed, 1 insertion(+) 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) -- 2.47.2