summaryrefslogtreecommitdiffstats
path: root/Incremental.c
Commit message (Collapse)AuthorAgeFilesLines
* Incremental: change precedence order for autof setting.NeilBrown2008-11-031-3/+4
| | | | | | | | | It doesn't really make sense for the --auto setting to ever over-ride the setting on an ARRAY line. That could cause failure if the ARRAY line has a 'standard' now. So revert to the array line having precedence over command line, then CREATE line last. Signed-off-by: NeilBrown <neilb@suse.de>
* Incremental: allow assembly of foreign array.NeilBrown2008-10-301-6/+12
| | | | | | | | | | | If a foreign (i.e. not known to be local) array is discovered by --incremental assembly, we now assemble it. However we ignore any name information in the array so as not to potentially create a name that conflict with a 'local' array. Also, foreign arrays are always assembled 'read-auto' to avoid writing anything until the array is actually used. Signed-off-by: NeilBrown <neilb@suse.de>
* Incremental: fix setting of 'autof' flag.NeilBrown2008-10-301-4/+10
| | | | | | | When doing auto-assembly, the 'autof' flag from array lines in mdadm.conf was being ignored. Signed-off-by: NeilBrown <neilb@suse.de>
* Fix --incremental assembly of partitions arrays.NeilBrown2008-10-301-5/+5
| | | | | | | | | | | | | | | | If incremental assembly finds an array mentioned in mdadm.conf, with a 'standard partitioned' name like /dev/md_d0 or /dev/md/d0, it will not create a partitioned array like it should. This is because it mishandled the 'devnum' returned by is_standard. That is a devnum that does not have the partition-or-not encoded into it. So we need to check the actual return value of is_standard and encode the partition-or-not info into the devnum. Also fix a couple of comments. Signed-off-by: NeilBrown <neilb@suse.de>
* Fix NULL pointer oopsDoug Ledford2008-10-301-4/+10
| | | | | | | | | | | | RAID10 is the only raid level that uses the avail char array pointer during the enough() operation, so it was the only one that saw this. The code in incremental assumes unconditionally that count_active will allocate the avail char array, that it might be used by enough, and that it will need to be freed afterward. Once you make count_active actually do that, then the oops goes away. Signed-off-by: Doug Ledford <dledford@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Make device-special files for partitions when using --incrementalNeil Brown2008-05-051-2/+3
|
* Unify code into find_free_devnum.Neil Brown2008-05-051-10/+5
| | | | | Two places have code to find a free md device number. Make this a subroutine.
* Fix for segfault when reading /proc/mdstatNeil Brown2008-04-281-0/+1
| | | | | | | | | 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.
* Replace sysarray with mdinfoNeil Brown2007-12-141-11/+12
| | | | | Sure, mdinfo is bigger, but having a uniform structure for lots of things will make life easier.
* Use 'mdinfo' instead of special 'sysdev' structure.Neil Brown2007-12-141-10/+11
| | | | | there is needless duplicatiion between mdinfo and sysdev, so discard the latter.
* Drop the superblock arg from all metadata methods.Neil Brown2007-12-141-32/+21
| | | | It is now in the 'supertype'
* Add 'supertype' arg to almost all metadata methods.Neil Brown2007-12-141-13/+13
| | | | The 'superblock' will be moved into this structure soon.
* Allow metadata handlers to free their own superblock.Neil Brown2007-12-141-6/+6
| | | | | | As the metadata handler allocates the superblock, it should free it too. DDF will have a more complex 'superblock' which needs more complex freeing.
* Release 2.6mdadm-2.6Neil Brown2006-12-211-0/+1
|
* Add new mode: --incrementalNeil Brown2006-12-211-0/+721
--incremental allows arrays to be assembled one device at a time. This is expected to be used with udev.