NeilBrown
f35f252592
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>
2008-09-18 16:01:55 +10:00
NeilBrown
7801ac2092
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>
2008-09-18 15:13:32 +10:00
Dan Williams
8ed3e5e1bf
Honor safemode_delay at Create() and Incremental() time
...
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2008-09-15 20:58:42 -07:00
NeilBrown
8850ee3e1e
Factor common code into new "start_mdmon".
...
Signed-off-by: Neil Brown <neilb@suse.de>
2008-07-18 16:37:11 +10:00
Dan Williams
5dcfcb715d
mdadm: add an environment variable to prevent auto-launching mdmon
...
Useful for attaching gdb to mdmon before any action is taken on the array.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2008-07-14 14:59:32 -07:00
Neil Brown
d7161f3b51
Fix fd comparison in Incremental
...
fd==0 is theoretically possible...
2008-07-12 20:28:38 +10:00
Neil Brown
b8ac196795
Remove 'major' from superswitch.
...
It isn't generally meaningful.
2008-07-12 20:27:37 +10:00
Neil Brown
1522c538b1
Use text_version in map_file rather than major.minor.
2008-07-12 20:27:37 +10:00
Neil Brown
dd15dc4a4d
Discard st->container_member
...
'container_member' isn't really a well defined concept.
Each metadata might enumerate members differently, so just
let each format /mdX/YYYY as appropriate.
2008-05-27 09:18:56 +10:00
Neil Brown
75aa18b53c
Start mdmon during incremental assembly of container
2008-05-27 09:18:52 +10:00
Neil Brown
25dbe93ab4
allow --incremental to reuse devices that already exist
...
.. and other fixes.
2008-05-27 09:18:43 +10:00
Neil Brown
2318b9f0dc
Remove 'fd' arg from sysfs_add_disk
...
It it never used, and removing means there are several 'open's that can
go.
2008-05-27 09:18:32 +10:00
Dan Williams
5f2aace8eb
Set 'metadata_version' for container_member in Incremental_container
...
From: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2008-05-15 16:48:25 +10:00
Neil Brown
598f0d58ac
Can now mostly assemble DDF arrays
2008-05-15 16:48:19 +10:00
Neil Brown
9a02c62af9
Make device-special files for partitions when using --incremental
2008-05-05 21:55:39 +10:00
Neil Brown
63152c1b33
Unify code into find_free_devnum.
...
Two places have code to find a free md device number. Make this
a subroutine.
2008-05-05 21:55:36 +10:00
Neil Brown
2cdb64897d
Fix for segfault when reading /proc/mdstat
...
Some kernel versions don't put a space between 'active' and '(auto-read-only)'
in /proc/mdstat. This causes a parsing problem leaving 'level' set to
NULL which causes a crash.
So synthesise a space there if it is missing, and check for 'level' to
be NULL and don't de-ref if it is.
2008-04-28 16:29:12 +10:00
Neil Brown
7e0f69790c
Replace sysarray with mdinfo
...
Sure, mdinfo is bigger, but having a uniform structure for lots of things
will make life easier.
2007-12-14 20:14:59 +11:00
Neil Brown
06c7f68e40
Use 'mdinfo' instead of special 'sysdev' structure.
...
there is needless duplicatiion between mdinfo and sysdev, so discard
the latter.
2007-12-14 20:14:57 +11:00
Neil Brown
3da92f272d
Drop the superblock arg from all metadata methods.
...
It is now in the 'supertype'
2007-12-14 20:14:33 +11:00
Neil Brown
68c7d6d790
Add 'supertype' arg to almost all metadata methods.
...
The 'superblock' will be moved into this structure soon.
2007-12-14 20:14:16 +11:00
Neil Brown
df37ffc039
Allow metadata handlers to free their own superblock.
...
As the metadata handler allocates the superblock, it should free it
too. DDF will have a more complex 'superblock' which needs more complex
freeing.
2007-12-14 20:14:00 +11:00
Neil Brown
f8409e5478
Release 2.6
2006-12-21 17:24:38 +11:00
Neil Brown
8382f19bdc
Add new mode: --incremental
...
--incremental allows arrays to be assembled one device at a time.
This is expected to be used with udev.
2006-12-21 17:10:52 +11:00