diff options
author | Czarnowska, Anna <anna.czarnowska@intel.com> | 2012-03-07 13:51:30 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-03-07 23:24:21 +0100 |
commit | 52f07f57195229809c7b6d71ca81d2182d303058 (patch) | |
tree | 02a0e5802fc438062ee8f9c3931455ee0d3fe92c /mapfile.c | |
parent | Manage: allow --re-add to failed array. (diff) | |
download | mdadm-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.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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) |