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" <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2010-11-30 18:35:36 +11:00
parent 002a3de3d4
commit 515afde355
3 changed files with 0 additions and 3 deletions

View File

@ -396,7 +396,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
if (a->check_degraded) {

View File

@ -358,7 +358,6 @@ struct mdstat_ent {
int resync; /* 1 if resync, 0 if recovery */
int devcnt;
int raid_disks;
int chunk_size;
char * metadata_version;
struct dev_member {
char *name;

View File

@ -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;