summaryrefslogtreecommitdiffstats
path: root/mapfile.c
diff options
context:
space:
mode:
authorCzarnowska, Anna <anna.czarnowska@intel.com>2012-03-07 13:51:30 +0100
committerNeilBrown <neilb@suse.de>2012-03-07 23:24:21 +0100
commit52f07f57195229809c7b6d71ca81d2182d303058 (patch)
tree02a0e5802fc438062ee8f9c3931455ee0d3fe92c /mapfile.c
parentManage: allow --re-add to failed array. (diff)
downloadmdadm-52f07f57195229809c7b6d71ca81d2182d303058.tar.xz
mdadm-52f07f57195229809c7b6d71ca81d2182d303058.zip
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 <anna.czarnowska@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mapfile.c')
-rw-r--r--mapfile.c1
1 files changed, 1 insertions, 0 deletions
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)