summaryrefslogtreecommitdiffstats
path: root/managemon.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2008-07-14 14:59:39 -0700
committerDan Williams <dan.j.williams@intel.com>2008-07-14 14:59:39 -0700
commit272bcc48d18b6f8dd89f3181b166e1fabfbd5b7b (patch)
treea7727dedf86b6c7940cbc9dd4b1f5ae520ca0092 /managemon.c
parent2cc98f9ea58485e1f539f77ba3eb5d9788908ae6 (diff)
downloadmdadm-272bcc48d18b6f8dd89f3181b166e1fabfbd5b7b.tar.gz
mdadm-272bcc48d18b6f8dd89f3181b166e1fabfbd5b7b.tar.xz
mdadm-272bcc48d18b6f8dd89f3181b166e1fabfbd5b7b.zip
mdmon: initialize component_size in manage_new
When we go to activate a spare for an array we expect ->info.component_size is valid. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'managemon.c')
-rw-r--r--managemon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/managemon.c b/managemon.c
index 3814fa9..94fbcb2 100644
--- a/managemon.c
+++ b/managemon.c
@@ -336,7 +336,7 @@ static void manage_new(struct mdstat_ent *mdstat,
inst = &mdstat->metadata_version[10+strlen(container->devname)+1];
mdi = sysfs_read(-1, new->devnum,
- GET_LEVEL|GET_CHUNK|GET_DISKS|
+ GET_LEVEL|GET_CHUNK|GET_DISKS|GET_COMPONENT|
GET_DEVS|GET_OFFSET|GET_SIZE|GET_STATE);
if (!mdi) {
/* Eeek. Cannot monitor this array.
@@ -348,6 +348,7 @@ static void manage_new(struct mdstat_ent *mdstat,
}
new->info.array = mdi->array;
+ new->info.component_size = mdi->component_size;
for (i = 0; i < new->info.array.raid_disks; i++) {
struct mdinfo *newd = malloc(sizeof(*newd));