summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Bugfix: mapfile locking is broken/racyfor-neilDoug Ledford2010-07-222-13/+11
| | | | | | | | | | | | | | | | | | | | | | While we attempt to use a lockfile to grant exclusive access to the mapfile, our implementation is buggy. Specifically, we create a lockfile, then lock it, at which point new instances can open the lockfile and attempt to lock it, which will cause them to block. However, when we are ready to unlock it, we unlink the file. This causes existing lock waiters to get a lock on an unlinked inode while a different instance may now create a new lockfile and get an exclusive lock on it. There are two possible fixes: don't unlink the lock file or require that the open of the lockfile include the O_CREAT|O_EXCL flags and on EEXIST retry the open until we either fail for a different error or actually create the lock file. I implemented the later on the assumption that the md device map file and therefore the lockfile are on local, early read write storage (probably a tmpfs of some sort) and therefore not subject to the problem that it doesn't work over nfs2 or earlier. In addition add warnings if we ever fail to get a lock when we request it. Signed-off-by: Doug Ledford <dledford@redhat.com>
* Bugfix: don't issue a read larger than the buffer to hold itDoug Ledford2010-07-221-1/+1
| | | | Signed-off-by: Doug Ledford <dledford@redhat.com>
* udev rules: add watch optionDoug Ledford2010-07-221-0/+1
| | | | | | | | | | | | | | The watch option to udev tells udev to watch our mdadm device file for close events and on a close it rechecks the device. This means that if, for example, we use mdadm to --grow the array from a 4 disk to 5 disk array, when mdadm closes the array, udev will re-read the superblock and update its internal database with the new information. This can also be used to cause udev to create new device special files if, for example, a partitioning program is used to modify the partition table on the actual md device and that program does not call the syscall to reread the partition table. Signed-off-by: Doug Ledford <dledford@redhat.com>
* Two Minor bug fixes to incremental supportDoug Ledford2010-07-221-4/+12
| | | | | | | | | | One: a single character typo (of instead of or in an error printout) Two: Audited usage of tfd file descriptor. Make sure that the tfd file is always closed after usage, and that the tfd variable is reset to -1 if we are going to continue in our loop (not necessary if we know we will return from our function without going through the dv loop again). Signed-off-by: Doug Ledford <dledford@redhat.com>
* Fix all the confusion over directories once and for all.Doug Ledford2010-07-226-65/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now have 3 directory definitions: mdmon directory for its pid and sock files (compile time define, not changable at run time), mdmonitor directory which is for the mdadm monitor mode pid file (can only be passed in via command line at the time mdadm is invoked in monitor mode), and the directory for the mdadm incremental assembly map file (compile time define, not changable at run time). Only the mdadm map file still hunts multiple locations, and the number of locations has been reduced to /var/run and the compile time specified location. Re-use of similar sounding defines that actually didn't denote their actual usage at compile time made it more difficult for a person to know what affect changing the compile time defines would have on the resulting programs. This patch renames the various defines to clearly identify which item the define affects. It also reduces the number of various directories which will be searched for these files as this has lead to confusion in mdadm and mdmon in terms of which files should take precedence when files exist in multiple locations, etc. It's best if the person compiling the program intentionally and with planning selects the right directories to be used for the various purposes. Which directory is right depends on which items you are talking about and what boot loader your system uses and what initramfs generation program your system uses. Because of the inter-dependency of all these items it would typically be up to the distribution that mdadm is being integrated into to select the correct values for these defines. Signed-off-by: Doug Ledford <dledford@redhat.com>
* Merge branch 'master' of git://github.com/djbw/mdadmHEADmasterNeilBrown2010-07-226-10/+69
|\
| * Incremental: restore assembly for inactive containers, block activeDan Williams2010-07-193-2/+17
| | | | | | | | | | | | | | GET_ARRAY_INFO always succeeds on an inactive container, so we need to be a bit more diligent about adding a disk to an active container. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * imsm: fix a -O2 build warningDan Williams2010-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | super-intel.c: In function ‘imsm_add_spare’: super-intel.c:4833: error: ‘array_start’ may be used uninitialized in this function super-intel.c:4834: error: ‘array_end’ may be used uninitialized in this function This is valid, if we don't find a spare candidate then array_{start,end} will be uninitialized. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * mdmon: satisfy glibc tls abi requirements with pthreadsDan Williams2010-07-062-6/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | Setting up a proper tls descriptor is required to conform to the abi [1]. Until it can be implemented in mdmon use pthreads instead of clone(2) to let glibc handle the details. The old behaviour can be had by un-defining USE_PTHREADS. Note, the "O2" builds need LDFLAGS now to pick up the '-pthread' option. [1]: http://people.redhat.com/drepper/tls.pdf Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Don't report Used Dev Size for RAID0.NeilBrown2010-07-222-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This number isn't meaningful for RAID0 as a different amount of space might be used from each device. It isn't meaningful for linear either, but already was not reported for linear. Detail doesn't report it either. So make --examine not report it. Signed-off-by: NeilBrown <neilb@suse.de> Reported-by: Mario 'BitKoenig' Holbe <Mario.Holbe@TU-Ilmenau.DE>
* | Cast to long long before left-shifting too much.NeilBrown2010-07-222-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | When left-shifting we must be sure that the value being shifted is large enough to not lose bits. The 'chunkssize' in CreateBitmap is only 'long' so it can overflow. So cast to 'long long' first. Also fix a similar issue in Detail even though it isn't currently being compiled. Signed-off-by: NeilBrown <neilb@suse.de> Reported-by: Tomasz Chmielewski <mangoo@wpkg.org>
* | super-0.90: don't write bitmap larger than 60KNeilBrown2010-07-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The 4K superblock can be as close as 64K from the end of the device. As the bitmap (with header) lives after the superblock (with 0.90 metadata) there could be as little as 60K of space. So limit the bitmaps to 59.5K, and only write 60K including the header. The bug fixed here means that bitmaps cannot be created on devices which are exact multiples of 64K in size Signed-off-by: NeilBrown <neilb@suse.de>
* | Improve --re-add documentationNeilBrown2010-07-071-15/+39
| | | | | | | | | | | | | | and add the fact that --test can now be used with --manage operations. Signed-off-by: NeilBrown <neilb@suse.de>
* | Fix the count of member devices in mdstat_read function.Marcin Labun2010-07-061-4/+5
| | | | | | | | | | | | | | | | | | | | Correction of the number of container or volume member devices (devcnt in struct mdstat_ent). The number after the last devices was counted towards member of devices. Signed-off-by: Marcin Labun <marcin.labun@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* | fix: IncrementalRemove leaves open handlePrzemyslaw Czarnowski2010-07-061-1/+4
|/ | | | Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com<mailto:przemyslaw.hawrylewicz.czarnowski@intel.com>>
* Merge branch 'master' of git://github.com/djbw/mdadmNeilBrown2010-07-0620-107/+831
|\
| * Merge branch 'fixes' into for-neilDan Williams2010-07-0116-87/+184
| |\
| | * mdmon: prevent allocations due to late bindingDan Williams2010-07-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current versions of glibc do not provide a useable interface to clone(2) as it inflicts hidden dependencies on setting up a glibc specific tls descriptor. The dynamic linker trips this dependency and causes mdmon to intermittently fail to load. Resolving all dynamic linking prior to starting the monitor thread appears to mitigate the issue but there is no guarantee that another tls dependency will bite us later. However, while the debate continues with the glibc maintainers it seems prudent to keep this change. It ensures that we do not get into a situation where the monitor thread needs to make a late allocation to resolve a symbol. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * Always assume SKIP_GONE_DEVS behaviour and kill the flagDan Williams2010-06-169-37/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...i.e. GET_DEVS == (GET_DEVS|SKIP_GONE_DEVS) A null pointer dereference in Incremental.c can be triggered by replugging a disk while the old name is in use. When mdadm -I is called on the new disk we fail the call to sysfs_read(). I audited all the locations that use GET_DEVS and it appears they can tolerate missing a drive. So just make SKIP_GONE_DEVS the default behaviour. Also fix up remaining unchecked usages of the sysfs_read() return value. Reported-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | Merge branch 'subarray' into for-neilDan Williams2010-07-0111-77/+722
| |\ \ | | | | | | | | | | | | | | | | | | | | Conflicts: mdadm.h super-intel.c
| | * | Rename subarray v2Dan Williams2010-06-226-14/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the name of the array stored in the metadata to be updated. In some cases the metadata format may not be able to support this rename without modifying the UUID. In these cases the request will be blocked. Otherwise we allow the rename to take place, even for active arrays. This assumes that the user understands the difference between the kernel node name, the device node symlink name, and the metadata specific name. Anticipating further need to modify subarrays in-place, introduce the ->update_subarray() superswitch method. A future potential use case is setting storage pool (spare-group) identifiers. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * | Kill subarray v2Dan Williams2010-06-159-40/+431
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support for deleting a subarray out of a container. When all subarrays are deleted the component devices are converted back into spares, a --zero-superblock is still needed to kill the remaining metadata at this point. This operation is blocked when the subarray is active and may also be blocked by the metadata handler when deleting the subarray might change the uuid of other active subarrays. For example, with imsm, deleting subarray 'n' may change the uuid of subarrays with indexes > n. Deleting a subarray needs to be a container wide event to ensure disks that record the modified subarray list perceive other disks that did not receive this change as out of date. Notes: The st->subarray parsing in super-intel.c and super-ddf.c is updated to be more strict now that we are reading user supplied subarray values. Offline container modification shares actions that mdmon typically handles so promote is_container_member() and version_to_superswitch() (formerly find_metadata_methods()) to generic utility functions for the cases where mdadm performs the operation. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | Remove 'checkpointing' side effect of --wait-cleanDan Williams2010-06-152-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that mdmon records periodic checkpoints, and checkpoints every ->set_array_state() event we no longer need to 'idle' sync_action from --wait-clean. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | mdmon: record sync_completed directly to the metadataDan Williams2010-06-152-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When sync_action is idle mdmon takes the latest value of md/resync_start or md/<dev>/recovery_start to record the resync/rebuild checkpoint in the metadata. However, now that mdmon is reading sync_completed there is no longer a need to wait for, or force an idle event to take a checkpoint. Simply update the forward progress of ->last_checkpoint at every wakeup event and force it to be recorded at least every 1/16th array-size interval. It may be recorded more frequently if a ->set_array_state() event occurs. This also cleans up some confusion in handling the dual-rebuild case. If more than one spare has been activated the kernel starts the rebuild at the lowest recovery offset, so we do not need to worry about min_recovery_start(). Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | imsm: dump each disk's view of the slot stateDan Williams2010-06-151-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow --examine to determine which disk might have a stale view of the per-disk out-of-sync state. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | create: Check with OROM limit before setting default chunk sizeDave Jiang2010-06-154-2/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make create check with the appropriate meta data handler and see what the largest chunk size is supported. The current 512K default is not supported by existing imsm OROM. [dan.j.williams@intel.com: trim the upper limit to 512k for future oroms] Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | mdmon: periodically checkpoint recoveryDan Williams2010-05-144-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel updates and notifies md/sync_completed when it is time to take a checkpoint. When this occurs (at 1/16 array size intervals) write 'idle' to md/sync_action to have the current recovery position updated in recovery_start and resync_start. Requires the metadata handler to reset ->last_checkpoint when it has determined that recovery has ended. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | | | Add --test option to --re-add and similarNeilBrown2010-07-065-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --test can be given in Manage mode. This can be used when there is an attempt to fail or remove 'faulty', 'failed' or 'detached' devices, or to re-add 'missing' devices. If no devices were failed, removed, or re-added, then mdadm will exit with status '2'. Signed-off-by: NeilBrown <neilb@suse.de>
* | | | Add support for "--re-add missing"NeilBrown2010-07-062-20/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the device name "missing" is given for --re-add, then mdadm will attempt to find any device which should be a member of the array but currently isn't and will --re-add it to the array. This can be useful if a device disappeared due to a cabling problem, and was then re-connected. The appropriate sequence would be mdadm /dev/mdX --fail detached mdadm /dev/mdX --remove detached mdadm /dev/mdX --re-add missing Signed-off-by: NeilBrown <neilb@suse.de>
* | | | Don't let incremental add devices to active arrays.NeilBrown2010-07-061-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding devices to active arrays in --incremental is a bit dubious. Normally the array won't be activated until all expected devices are present, so this situation would mean that the given device is not expected, so is probably failed. In that case it should only be added by explicit sysadmin request. However if --run was given, then quite possibly the array was assembled earlier when not complete, so it is less clear whether it is wrong to add this device or not. In that case add it as that is generally safest. It would be nice to allow policy for this to be explicitly given by sysadmin. Signed-off-by: NeilBrown <neilb@suse.de>
* | | | Assemble: Fix honouring of 'auto' config lineNeilBrown2010-07-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 1ff98339283645a20c980d540f6c4d82693e7daf broke the checking of metadata types via the 'auto' line. Be moving 'load_super" before "conf_test_metadata" we left tst->sb set even if conf_test_metadata fails, so the device will actually be accepted and used. So if we decide to reject the device, free the superblock so it is clear that it is rejected. Signed-off-by: NeilBrown <neilb@suse.de>
* | | | Avoid skipping devices where removing all faulty/detached devices.NeilBrown2010-06-301-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using 0.90 metadata, devices can be renumbered when earlier devices are removed. So when iterating all devices looking for 'failed' or 'detached' devices, we need to re-check the same slot we checked last time to see if maybe it has a different device now. Reported-by: Jim Paris <jim@jtan.com> Resolves-Debian-Bug: 587550 Signed-off-by: NeilBrown <neilb@suse.de>
* | | | Update udev rules for hotplug support.NeilBrown2010-06-301-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - split the rules for handling components of array to be clearly separate from rules for handling the arrays themselves. - add call to "-If" when removing a device - uncomment the --incremental call when adding a device. Signed-off-by: NeilBrown <neilb@suse.de>
* | | | Add -fail support to --incrementalNeilBrown2010-06-306-9/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can be used for hot-unplug. When a device has been remove, udev can call mdadm --incremental --fail sda and mdadm will find the array holding sda and remove sda from the array. Based on code from Doug Ledford <dledford@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
* | | | Support fail/remove using kernel nameNeilBrown2010-06-301-20/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow kernel names like "sda" and "hdb1" to be used to fail/remove devices from an array. This is useful as after a device has been removed it can be difficult to get the major/minor number. Signed-off-by: NeilBrown <neilb@suse.de>
* | | | Add mdstat_by_componentNeilBrown2010-06-302-4/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows finding the array which contains a given component. Components are named using the kernel-internal string name such as "sda1" or "hdb". Don't return member arrays, only the contain that contains them. Also tidy up the parsing of 'inactive' arrays in /proc/mdstat. If we see 'inactive' we need to set 'in_devs' immediately as there is no level coming. Signed-off-by: NeilBrown <neilb@suse.de>
* | | | Correct documentation for --rebuild-mapNeilBrown2010-06-302-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some places it is referred to as "--rebuild", and while that works due to getopt allowing prefixes, it could appear confusing (rebuild means other things too) and being explicit is some safeguard if we want to add e.g. --rebuild-foo later. Reported-by: Doug Ledford <dledford@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
* | | | Fix parsing of inactive arrays in /proc/mdstatJeff DeFouw2010-06-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | They don't have a level, so we should not expect one, and should expect devices instead. Signed-off-by: NeilBrown <neilb@suse.de>
* | | | Create: fix typo in RAID10 default layout message.NeilBrown2010-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It reports "layout defaults to n1" but it means "... to n2". Reported-by: Adrian Sandor <aditsu@yahoo.com> Signed-off-by: NeilBrown <neilb@suse.de>
* | | | mdadm.conf: fix AUTO typoNeilBrown2010-06-051-1/+1
| |_|/ |/| | | | | | | | | | | Reported-by: Marc Schiffbauer <marc@schiffbauer.net> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | | Fix man page reference to --level changes with --grow.NeilBrown2010-05-311-2/+3
| | | | | | | | | | | | | | | | | | | | | --level can be used with --grow now, so correct man page. Reported-by: "Leslie Rhorer" <lrhorer@satx.rr.com> Signed-off-by: NeilBrown <neilb@suse.de>
* | | Compile-time switch to enable 0.9 metadata as defaultmartin f. krafft2010-05-314-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces DEFAULT_OLD_METADATA as a preprocessor definition. If defined, it causes mdadm to assume metadata version 0.9 as default. If not defined, version 1.x (currently 1.2) is used as default. The man page mdadm.8 is also modified to reflect the chosen default. The selftests will not work if the old default is chosen. This patch was requested by Debian so they could distribute a current mdadm together with boot loaders that only understand 0.90 metadata for md-raid. Preferred usage is simply make DEFAULT_OLD_METADATA=yes Signed-off-by: martin f. krafft <madduck@debian.org> Signed-off-by: NeilBrown <neilb@suse.de>
* | | Revert change to handling of -empty-string- metadata.NeilBrown2010-05-312-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the metadata is an empty string, it means the array in question does not use metadata. This comes from sysfs_read finding "none" in "metadata_version", then super_by_fd noticing the vers == -1, and so just using the ->text_version (which is empty). In this case we want to use the super0 metadata handler routines because that is what we always used to do before commit 7d5c3964ccfaace123f7b75e15d38c2650e013d8 And that commit was wrong because "" doesn't mean "default" and so should not have been changed at the same time. Reported-by: martin f. krafft <madduck@debian.org> Signed-off-by: NeilBrown <neilb@suse.de>
| | |
| \ \
*-. | | Merge commit '3288b419b988b20a53a2b12eb8e5f9f536228db4'; commit ↵NeilBrown2010-05-313-26/+33
|\ \| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '4363fd80bcc9f85ed824228dee5e6350a8d73e18'; commit '63b4aae33ebf00d443378daf313622630f2336c0' * commit '3288b419b988b20a53a2b12eb8e5f9f536228db4': Revert "Incremental: honor --no-degraded to delay assembly" Incremental: honor an 'enough' flag from external handlers * commit '4363fd80bcc9f85ed824228dee5e6350a8d73e18': imsm: robustify recovery-start detection fix: memory leak in mdmon_pid() * commit '63b4aae33ebf00d443378daf313622630f2336c0': mdmon: fix missing open of md/<dev>/recovery_start
| | * | mdmon: fix missing open of md/<dev>/recovery_startDan Williams2010-04-291-25/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When activating a spare we neglect to open recovery_start and as such do not see checkpoint events. Move disk initialization to common routine to mitigate recurrence. Reported-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | imsm: robustify recovery-start detectionDan Williams2010-05-261-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | update_recovery_start() assumed that the out-of-sync disk would always be marked as IMSM_ORD_REBUILD in the disk_ord_tbl, but the segmentation fault reported by Andy proves otherwise. This might also be explained by an interrupted rebuild and the disk has not yet been marked missing. https://bugzilla.redhat.com/show_bug.cgi?id=592030 Reported-by: Andy Lutomirski <luto@mit.edu> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | | fix: memory leak in mdmon_pid()Przemyslaw Hawrylewicz Czarnowski2010-05-171-1/+5
| | |/ | |/| | | | | | | | | | | | | | | | | | | devnum2devname() returns pointer to memory allocated with strdup. It must be released to prevent memory leak. Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | | Revert "Incremental: honor --no-degraded to delay assembly"Dan Williams2010-05-263-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fdb482f99b9ad2ef8cd1724902fdfeedaa8796a1. Now that containers can report state for ->container_enough we can automatically determine when the array can be started, and no longer need the --no-degraded hammer. Conflicts: Incremental.c Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | | Incremental: honor an 'enough' flag from external handlersDan Williams2010-05-264-21/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed for imsm where: 1/ we want to report raid_disks as zero to allow mdadm -As to incorporate all spares 2/ we can't determine stale disks by looking at the event counts. 3/ we can't see per-subarray expectations with the info returned from the container level ->getinfo_super() Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | | Monitor: don't report the disappearance of a faulty device as SpareActive.NeilBrown2010-05-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally Monitor doesn't see faulty devices in active slots - they get moved away too quickly. But if it does, it reports the "faulty device disappeared" event (when it finally does get moved away) as SpareActive due to insufficient checking. So add a better check. Reported-by: Pierre Vignéras <pierre@vigneras.name>