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:
parent
484ae54d16
commit
ab2bb0b621
|
@ -399,7 +399,6 @@ static void manage_member(struct mdstat_ent *mdstat,
|
||||||
|
|
||||||
// FIXME
|
// FIXME
|
||||||
a->info.array.raid_disks = mdstat->raid_disks;
|
a->info.array.raid_disks = mdstat->raid_disks;
|
||||||
a->info.array.chunk_size = mdstat->chunk_size;
|
|
||||||
// MORE
|
// MORE
|
||||||
|
|
||||||
/* honor 'frozen' */
|
/* honor 'frozen' */
|
||||||
|
|
1
mdadm.h
1
mdadm.h
|
@ -386,7 +386,6 @@ struct mdstat_ent {
|
||||||
int resync; /* 3 if check, 2 if reshape, 1 if resync, 0 if recovery */
|
int resync; /* 3 if check, 2 if reshape, 1 if resync, 0 if recovery */
|
||||||
int devcnt;
|
int devcnt;
|
||||||
int raid_disks;
|
int raid_disks;
|
||||||
int chunk_size;
|
|
||||||
char * metadata_version;
|
char * metadata_version;
|
||||||
struct dev_member {
|
struct dev_member {
|
||||||
char *name;
|
char *name;
|
||||||
|
|
1
mdstat.c
1
mdstat.c
|
@ -185,7 +185,6 @@ struct mdstat_ent *mdstat_read(int hold, int start)
|
||||||
ent->resync = 0;
|
ent->resync = 0;
|
||||||
ent->metadata_version = NULL;
|
ent->metadata_version = NULL;
|
||||||
ent->raid_disks = 0;
|
ent->raid_disks = 0;
|
||||||
ent->chunk_size = 0;
|
|
||||||
ent->devcnt = 0;
|
ent->devcnt = 0;
|
||||||
ent->members = NULL;
|
ent->members = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue