From: NeilBrown Date: Tue, 30 Nov 2010 07:35:36 +0000 (+1100) Subject: mdmon: don't copy an invalid chunk_size X-Git-Tag: mdadm-3.2~210 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab2bb0b62177635b3f2a7336c31a59af9d1f6308;p=thirdparty%2Fmdadm.git mdmon: don't copy an invalid chunk_size As chunk_size in mdstat_ent is never set, we shouldn't copy it into a->info.array. In fact, it is safest to get rid of the field altogether. Reported-by: "Kwolek, Adam" Signed-off-by: NeilBrown --- diff --git a/managemon.c b/managemon.c index 8915522d..12a37927 100644 --- a/managemon.c +++ b/managemon.c @@ -399,7 +399,6 @@ static void manage_member(struct mdstat_ent *mdstat, // FIXME a->info.array.raid_disks = mdstat->raid_disks; - a->info.array.chunk_size = mdstat->chunk_size; // MORE /* honor 'frozen' */ diff --git a/mdadm.h b/mdadm.h index 05bf0b8d..91afe160 100644 --- a/mdadm.h +++ b/mdadm.h @@ -386,7 +386,6 @@ struct mdstat_ent { int resync; /* 3 if check, 2 if reshape, 1 if resync, 0 if recovery */ int devcnt; int raid_disks; - int chunk_size; char * metadata_version; struct dev_member { char *name; diff --git a/mdstat.c b/mdstat.c index bb030bf3..fdce5165 100644 --- a/mdstat.c +++ b/mdstat.c @@ -185,7 +185,6 @@ struct mdstat_ent *mdstat_read(int hold, int start) ent->resync = 0; ent->metadata_version = NULL; ent->raid_disks = 0; - ent->chunk_size = 0; ent->devcnt = 0; ent->members = NULL;