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 /Create.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 'Create.c')
-rw-r--r-- | Create.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -714,11 +714,7 @@ int Create(struct supertype *st, char *mddev, int mdfd, inf->errors = 0; rv = 0; - if (st->ss->external) - rv = sysfs_add_disk(sra, inf); - else - rv = ioctl(mdfd, ADD_NEW_DISK, - &inf->disk); + rv = add_disk(mdfd, st, sra, inf); if (rv) { fprintf(stderr, |