diff options
author | NeilBrown <neilb@suse.de> | 2010-11-22 20:24:50 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-11-22 20:24:50 +1100 |
commit | 2b959fbf66d35f02ea57074428268bf7cc62c18b (patch) | |
tree | bf3dcbf18de2a20be81ba39ac6ff920db965d6af | |
parent | e1902a7b6ceafde57eace1a5d1f19753df273141 (diff) |
New method: load_container
This handles the 'container' part of 'load_super', so we can
soon make them completely separate - it is just confusing to
overload these two.
Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r-- | mdadm.h | 1 | ||||
-rw-r--r-- | super-ddf.c | 8 | ||||
-rw-r--r-- | super-intel.c | 6 |
3 files changed, 15 insertions, 0 deletions
@@ -597,6 +597,7 @@ extern struct superswitch { int (*write_init_super)(struct supertype *st); int (*compare_super)(struct supertype *st, struct supertype *tst); int (*load_super)(struct supertype *st, int fd, char *devname); + int (*load_container)(struct supertype *st, int fd, char *devname); struct supertype * (*match_metadata_desc)(char *arg); __u64 (*avail_size)(struct supertype *st, __u64 size); int (*add_internal_bitmap)(struct supertype *st, int *chunkp, diff --git a/super-ddf.c b/super-ddf.c index d756d8b1..7a368d7c 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -2880,6 +2880,13 @@ static int load_super_ddf_all(struct supertype *st, int fd, st->loaded_container = 1; return 0; } + +static int load_container_ddf(struct supertype *st, int fd, + char *devname) +{ + return load_super_ddf_all(st, fd, &st->sb, devname); +} + #endif /* MDASSEMBLE */ static struct mdinfo *container_content_ddf(struct supertype *st, char *subarray) @@ -3649,6 +3656,7 @@ struct superswitch super_ddf = { .validate_geometry = validate_geometry_ddf, .write_init_super = write_init_super_ddf, .add_to_super = add_to_super_ddf, + .load_container = load_container_ddf, #endif .match_home = match_home_ddf, .uuid_from_super= uuid_from_super_ddf, diff --git a/super-intel.c b/super-intel.c index 335f516b..430c5edf 100644 --- a/super-intel.c +++ b/super-intel.c @@ -2876,6 +2876,11 @@ static int load_super_imsm_all(struct supertype *st, int fd, void **sbp, return 0; } + +static int load_container_imsm(struct supertype *st, int fd, char *devname) +{ + return load_super_imsm_all(st, fd, &st->sb, devname); +} #endif static int load_super_imsm(struct supertype *st, int fd, char *devname) @@ -5574,6 +5579,7 @@ struct superswitch super_imsm = { .detail_platform = detail_platform_imsm, .kill_subarray = kill_subarray_imsm, .update_subarray = update_subarray_imsm, + .load_container = load_container_imsm, #endif .match_home = match_home_imsm, .uuid_from_super= uuid_from_super_imsm, |