summaryrefslogtreecommitdiffstats
path: root/super-ddf.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-09-18 16:01:55 +1000
committerNeilBrown <neilb@suse.de>2008-09-18 16:01:55 +1000
commitf35f25259279573c6274e2783536c0b0a399bdd4 (patch)
treefc464d06069d7cf50b642dce3bc01ec6d5f08677 /super-ddf.c
parent7801ac209240ca5d5159d2ab990dd8d5573e2195 (diff)
downloadmdadm-f35f25259279573c6274e2783536c0b0a399bdd4.tar.gz
mdadm-f35f25259279573c6274e2783536c0b0a399bdd4.tar.xz
mdadm-f35f25259279573c6274e2783536c0b0a399bdd4.zip
Move calls to SET_ARRAY_INFO to common helper.
When we assemble an array, there are three different approaches depending on whether metadata is internal or external, and on kernel version. Move all this to a common helper instead of duplicating in 3 places. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super-ddf.c')
-rw-r--r--super-ddf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/super-ddf.c b/super-ddf.c
index f7bdd2a..70889dc 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -1248,6 +1248,8 @@ static void getinfo_super_ddf(struct supertype *st, struct mdinfo *info)
info->reshape_active = 0;
+ info->array.major_version = -1;
+ info->array.minor_version = -2;
strcpy(info->text_version, "ddf");
info->safe_mode_delay = 0;
@@ -1303,6 +1305,8 @@ static void getinfo_super_ddf_bvd(struct supertype *st, struct mdinfo *info)
uuid_from_super_ddf(st, info->uuid);
info->container_member = atoi(st->subarray);
+ info->array.major_version = -1;
+ info->array.minor_version = -2;
sprintf(info->text_version, "/%s/%s",
devnum2devname(st->container_dev),
st->subarray);
@@ -2591,6 +2595,8 @@ static struct mdinfo *container_content_ddf(struct supertype *st)
this->array.layout = rlq_to_layout(vc->conf.rlq, vc->conf.prl,
this->array.raid_disks);
this->array.md_minor = -1;
+ this->array.major_version = -1;
+ this->array.minor_version = -2;
this->array.ctime = DECADE +
__be32_to_cpu(*(__u32*)(vc->conf.guid+16));
this->array.utime = DECADE +