[PATCH] Reset bad flag on map update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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@xxxxxxxxx>
---
 mapfile.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/mapfile.c b/mapfile.c
index 0bfecd0..9e2c893 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)
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ATA RAID]     [Linux SCSI Target Infrastructure]     [Managing RAID on Linux]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device-Mapper]     [Kernel]     [Linux Books]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Photos]     [Yosemite Photos]     [Yosemite News]     [AMD 64]     [Linux Networking]

Add to Google Powered by Linux