diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-07-31 17:08:22 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-07-31 17:08:22 -0700 |
commit | af99d9ca67a4dc898e7be1d4a947800deec93c83 (patch) | |
tree | f5335e0be64ab1bf9004d641ae21a7acb60be80d /super-ddf.c | |
parent | fa09d4961e5c72da3c7f78d53a7d64f5196110a3 (diff) | |
download | mdadm-af99d9ca67a4dc898e7be1d4a947800deec93c83.tar.gz mdadm-af99d9ca67a4dc898e7be1d4a947800deec93c83.tar.xz mdadm-af99d9ca67a4dc898e7be1d4a947800deec93c83.zip |
teach imsm and ddf what st->subarray means at load_super time
RebuildMap wants to poll through mdstat and retrieve a (kernel name,
uuid, user name) tuple for each array. Teach imsm and ddf to honor
st->sub_array at ->load_super() time to set their internal subarray
pointers to the value specified in st->subarray, or return an error if
st->subarray specifies an invalid array.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'super-ddf.c')
-rw-r--r-- | super-ddf.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/super-ddf.c b/super-ddf.c index 5ad89c2..517a586 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -835,6 +835,18 @@ static int load_super_ddf(struct supertype *st, int fd, return rv; } + if (st->subarray[0]) { + struct vcl *v; + + for (v = super->conflist; v; v = v->next) + if (v->vcnum == atoi(st->subarray)) + super->currentconf = v; + if (!super->currentconf) { + free(super); + return 1; + } + } + /* Should possibly check the sections .... */ st->sb = super; |