diff options
author | NeilBrown <neilb@suse.de> | 2008-09-18 07:13:32 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-09-18 07:13:32 +0200 |
commit | 7801ac209240ca5d5159d2ab990dd8d5573e2195 (patch) | |
tree | 9eef66102669532a41150d2750c234b6cf658bfe /super-intel.c | |
parent | Ignore leading zeros in version number information. (diff) | |
download | mdadm-7801ac209240ca5d5159d2ab990dd8d5573e2195.tar.xz mdadm-7801ac209240ca5d5159d2ab990dd8d5573e2195.zip |
Factor out add-disk code
The variety of approaches to 'add_disk' are factored out into
a separate function, and Incremental mode benefits by being
closer to supporting the assembly of containers.
Also remove the adding-to-array-data-structure out of sysfs_add_disk
and into add_disk.
And add some tests for --incremental mode to make sure we don't break it.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super-intel.c')
-rw-r--r-- | super-intel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/super-intel.c b/super-intel.c index bbc07302..07539ca0 100644 --- a/super-intel.c +++ b/super-intel.c @@ -1796,7 +1796,7 @@ static int create_array(struct supertype *st) return 0; } -static int add_disk(struct supertype *st) +static int _add_disk(struct supertype *st) { struct intel_super *super = st->sb; size_t len; @@ -1833,7 +1833,7 @@ static int write_init_super_imsm(struct supertype *st) /* in the add disk case we are running in mdmon * context, so don't close fd's */ - return add_disk(st); + return _add_disk(st); } else rv = create_array(st); |