summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * Fail overtly when asprintf fails to allocate memoryDustin Kirkland2009-01-083-3/+14
| | | | | | | | | | | | .. rather that causing a less-obvious violation of segments. Signed-off-by: NeilBrown <neilb@suse.de>
| * Free mdstat data structures properly.NeilBrown2009-01-083-1/+4
| | | | | | | | | | | | | | In one case we called 'free' instead of 'mdstat_free'. In others we didn't free at all. Signed-off-by: NeilBrown <neilb@suse.de>
* | Merge branch 'devel' of ↵NeilBrown2008-12-1820-118/+1620
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/djbw/mdadm into devel-3.0
| * | imsm: test overlapping createsDan Williams2008-12-083-0/+94
| | | | | | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | workaround a hald interaction and quiet cleanupDan Williams2008-12-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The 'udevadm settle' call appears to resolve: mdadm: failed to stop array /dev/md127: Device or resource busy Perhaps a running process, mounted filesystem or active volume group? Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | test: enable per-test custom environment setup/teardownDan Williams2008-12-081-0/+18
| | | | | | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | imsm: don't take chunk_size into account for raid1Dan Williams2008-12-081-1/+4
| | | | | | | | | | | | | | | | | | Results in chopping off usable parts of the requested size. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | imsm: reverse swapped arguments to posix_memalign in imsm_prepare_updateDan Williams2008-12-081-1/+1
| | | | | | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | imsm: convert dev_tbl to devlistDan Williams2008-12-081-37/+108
| | | | | | | | | | | | | | | | | | | | | ...to facilitate testing arbitrary numbers of raid devices Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | imsm: provide a detail_platform methodDan Williams2008-12-081-0/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | Dump the orom capabilities and hardware disk configuration. This code relies on the name of scsi_host objects to determine the hardware port number. Hopefully this information is stable... Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | introduce --detail-platform to display platform raid capabilitiesDan Williams2008-12-089-3/+89
| | | | | | | | | | | | | | | | | | | | | Metadata formats like imsm work in concert with platform firmware and hardware, so provide a way for mdadm to display this info to the user. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | imsm: validate arrays being created against firmware capabilitiesDan Williams2008-12-083-14/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These checks are only enabled when platform support for imsm is found, i.e. ahci driver is loaded and talking to an Intel(R) controller, and the option rom header is located. They can be turned off by setting the environment variable IMSM_NO_PLATFORM to 1. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | imsm: sysfs support routines for determining device connectivityDan Williams2008-12-082-0/+64
| | | | | | | | | | | | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | imsm: detect option-rom capabilitiesDan Williams2008-12-082-0/+267
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The option-rom advertises its capabilities in a data structure located in the platform ROM region 0xc0000-0xf0000. Attempt to detect the option-rom and limit array creation to the platform's capabilities. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | port arch/x86/kernel/probe_roms_32.c for use in 'platform' supportDan Williams2008-12-082-0/+303
| | | | | | | | | | | | | | | | | | | | | | | | | | | This provides at least a kernel bug compatible method of scanning for an adapter-rom. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | imsm: pass disk info in create messageDan Williams2008-12-081-37/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We may be creating on spare disks in which case we need to know which disk goes in which slot. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | imsm: correct start offset handling at create timeDan Williams2008-12-081-22/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | imsm metadata requires all members of a raid volume to start at the same offset. So, incrementally build a composite disk from all the candidates passed to ->validate_geometry. After each disk is added merge the extents and search for a common start offset that satisfies the requested raid device size. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | imsm: fix setting of device size for raid1Dan Williams2008-12-081-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | When chunksize is 0 in the raid1 case we need to use info_to_blocks_per_member() to calculate the array size. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | wait_for container assemblyDan Williams2008-12-081-0/+1
| | | | | | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | fix ->metadata_version checking in Wait()Dan Williams2008-12-021-1/+1
| | | | | | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | | Merge branch 'master' into devel-3.0NeilBrown2008-12-187-55/+138
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Assemble.c Incremental.c Kill.c ReadMe.c inventory mapfile.c mdadm.8 mdadm.spec mdassemble.8
| * | map: rebuild map if it doesn't exist.NeilBrown2008-12-182-47/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | It is possible for some arrays to be created e.g. by initrd, and so not get mentioned in /var/run/mdadm/map. As "-I" depends on things being listed in 'map', we create it by scanning all devices if it doesn't exist. Signed-off-by: NeilBrown <neilb@suse.de>
| * | Assemble: set stripe_cache_size properly when restarting a reshape.NeilBrown2008-12-181-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | Reshape with large chunk size can require a large stripe_cache. We make this work when starting the reshape but not when restarting at assemble time. So fix that. Signed-off-by: NeilBrown <neilb@suse.de>
| * | Assemble: don't assume array is 'clean' unless all devices think it is.NeilBrown2008-12-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This is only significant for --assemble --force where some old devices might be included into the array. If anything looks like it isn't clean, the kernel will not allow a degraded array to be started. Signed-off-by: NeilBrown <neilb@suse.de>
| * | Kill: Don't use O_EXCL when --force is used.NeilBrown2008-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | We really want --zero-super --force to zero the superblock in all situations. So don't open with O_EXCL - trust the user. Signed-off-by: NeilBrown <neilb@suse.de>
| * | Allow --config in --incremental mode.NeilBrown2008-12-011-0/+1
| | |
| * | Release 2.6.8NeilBrown2008-11-286-4/+64
| | |
| * | Fix typo in mdadm.conf.5NeilBrown2008-11-281-1/+1
| | | | | | | | | | | | | | | | | | Debian Bug #506245 Signed-off-by: NeilBrown <neilb@suse.de>
| * | fix add_dev() handling of broken linksDan Williams2008-11-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolves issues like: mdadm -Ss mdadm: unable to open /dev/md/r1: No such file or directory ...where /dev/md/r1 points to a removed device. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | | DDF: improve --examine outputNeilBrown2008-12-041-19/+38
| | | | | | | | | | | | | | | | | | | | | Make this more readable and in line with other metadata types by providing a table for the devices. Signed-off-by: NeilBrown <neilb@suse.de>
* | | Create: support autolayout when creating in a DDFNeilBrown2008-12-044-47/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | If, when creating an array, a signal target device is given which is a container, then allow the metadata handler to choose which devices to use. This is currently only supported for DDF. Signed-off-by: NeilBrown <neilb@suse.de>
* | | Change 'size' argument to validate_geometry to be sectors, not KNeilBrown2008-12-044-7/+8
| | | | | | | | | | | | | | | | | | That way it is the same a *freesize, and generally less confusing. Signed-off-by: NeilBrown <neilb@suse.de>
* | | Create: print message when preparing a container.NeilBrown2008-11-281-1/+2
| |/ |/| | | | | | | | | | | | | We currently print e.g. "Array /dev/md0 started", but nothing for containers. Fix that. Signed-off-by: NeilBrown <neilb@suse.de>
* | Merge branch 'master' into devel-3.0NeilBrown2008-11-271-2/+0
|\|
| * Assemble: allow --force to work even when event counts are 0.NeilBrown2008-11-271-2/+0
| | | | | | | | | | | | | | | | | | | | If any superblocks in a confused array had an event count of 0, "mdadm -Af" would not update the event counts to assemble the array. I don't remember why that text is there, and it has caused at least one situation to be difficult to recover from. So remove the test. --force means --force! Signed-off-by: NeilBrown <neilb@suse.de>
* | Assemble: wait for device to appear via udevNeilBrown2008-11-271-0/+1
| | | | | | | | | | | | | | Use the new "wait_for" function to make sure udev has created the device before completion the 'assemble'. Signed-off-by: NeilBrown <neilb@suse.de>
* | imsm: fix metadata reservationDan Williams2008-11-271-0/+7
| | | | | | | | | | | | | | | | | | | | 1/ When truncating the space reserved for the metadata round down to an even numbered sector count to avoid an off-by-one error when sysfs_add_disk rounds up. 2/ Set the current metadata parameter block size as a floor. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Tidy error messages for add_to_super failure.NeilBrown2008-11-273-7/+10
| | | | | | | | | | | | | | Make sure every failure from add_to_super prints a suitable error message, and then don't print any error in the caller. Signed-off-by: NeilBrown <neilb@suse.de>
* | allow add_to_super to return errorsDan Williams2008-11-277-18/+35
| | | | | | | | | | | | Prepare add_to_super to validate disks against the platform capabilities Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Support --wait-clean --scanDan Williams2008-11-272-8/+17
| | | | | | | | | | | | | | Its cumbersome to determine which devices to wait for in a system shutdown script, so hook up --scan. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | some warn_unused_result fixupsDan Williams2008-11-271-5/+9
| | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Assemble: don't auto-assemble if any arrays are listed in mdadm.confNeilBrown2008-11-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Auto-assembly and planned assembly don't really work well together, it can be confusing. In particular in mkinitrd or similar creates an mdadm.conf to assemble a particular array, we shouldn't go assembling any other arrays as well. If you want auto assembly, you need to give mdadm a config file with no ARRAY lines. mdadm -Ascpartitions can do this. Signed-off-by: NeilBrown <neilb@suse.de>
* | mdmon: pass symbolic name to mdmon instead of device name.NeilBrown2008-11-204-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | Now that names in /dev are usually created (eventually) by udev, it isn't really safe to rely in finding a name in /dev to pass to mdmon to identify which array to monitor. And it isn't really necessary to have a name in /dev. So just pass the symbolic name, e.g. md127 or md123. Change util.c to pass that name, and change mdmon to process the name sensibly. Signed-off-by: NeilBrown <neilb@suse.de>
* | fix add_dev() handling of broken linksDan Williams2008-11-101-1/+3
| | | | | | | | | | | | | | | | | | | | Resolves issues like: mdadm -Ss mdadm: unable to open /dev/md/r1: No such file or directory ...where /dev/md/r1 points to a removed device. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | fix remove_devices()Dan Williams2008-11-081-4/+6
| | | | | | | | | | | | Don't write to 'pe' if 'path' was not specified Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | imsm: fix uuid_from_super given 'signature' is not constantDan Williams2008-11-081-1/+1
| | | | | | | | | | | | | | The version portion of the signature changes depending on the contents of the container. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | imsm: compatibility fixes for creating imsm arraysDan Williams2008-11-081-5/+64
| | | | | | | | | | | | | | When creating an imsm array use the lowest possible feature set to maximize compatibility. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | imsm: fixup disk status definition endianessDan Williams2008-11-081-51/+27
| | | | | | | | | | | | | | Change the multibyte disk status field definitions to imsm byte-order (little-endian) to match other multibyte field definitions. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | imsm: add definitions for recent imsm versionsDan Williams2008-11-081-8/+48
| | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | imsm: cleanup migration definitions and usageDan Williams2008-11-071-12/+18
| | | | | | | | | | | | imsm_set_array_state need not look at the map_state when failed==0 Signed-off-by: Dan Williams <dan.j.williams@intel.com>