diff options
author | NeilBrown <neilb@suse.de> | 2008-09-18 15:13:32 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-09-18 15:13:32 +1000 |
commit | 7801ac209240ca5d5159d2ab990dd8d5573e2195 (patch) | |
tree | 9eef66102669532a41150d2750c234b6cf658bfe /mdadm.h | |
parent | 9b2a22d319a85c1571c776e7059d9ca4bf1a0f0a (diff) | |
download | mdadm-7801ac209240ca5d5159d2ab990dd8d5573e2195.tar.gz 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 'mdadm.h')
-rw-r--r-- | mdadm.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -767,6 +767,8 @@ extern unsigned long long calc_array_size(int level, int raid_disks, int layout, extern int flush_metadata_updates(struct supertype *st); extern void append_metadata_update(struct supertype *st, void *buf, int len); +extern int add_disk(int mdfd, struct supertype *st, + struct mdinfo *sra, struct mdinfo *info); extern char *human_size(long long bytes); char *human_size_brief(long long bytes); |