summaryrefslogtreecommitdiffstats
path: root/super-intel.c
Commit message (Collapse)AuthorAgeFilesLines
* Make --brief even briefer.NeilBrown2009-05-111-1/+1
| | | | | | | | | | | | | Because ---examine --brief, or --detail --brief are often used to create mdadm.conf, and because people don't want to have to update their mdadm.conf unnecessarily, we don't want to include information that might change. And now that level changing is supported, that is almost everything but UUID. So move some more fields into the "Only print with --verbose" class. Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: add the ddf fieldDan Williams2009-04-121-1/+2
| | | | | | | | | This field is always one in arrays created by the Windows driver / OROM, not sure why... Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: round down array size at CreateDan Williams2009-04-121-0/+4
| | | | | | | | | | Store the 1MB rounded down size of the array at create time. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: set array size at Create/AssembleDan Williams2009-04-121-0/+3
| | | | | | | | | | imsm arrays round down the effective array size to the closest 1 megabyte boundary so teach get_info_super_imsm and sysfs_set_array to set 'md/array_size' if available (and make sure ddf uses the default size). Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: turn off curr_migr_unit updatesDan Williams2009-04-121-8/+3
| | | | | | | | | | | New documentation shows that this field is not equivalent to md/resync_start. Disable updates until full support can be developed. Writing '0' when a migration starts/re-starts remains correct. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: defend against unsupported migrations (temporary)Dan Williams2009-04-121-1/+13
| | | | | | | | | | | Until support for higher order migrations (online capacity expansion, raid level migration, chunk size migration...) are implemented do not allow arrays in these states to be assembled. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: add 'verify', 'verify with fixup', and 'general' migration typesDan Williams2009-04-121-12/+50
| | | | | | | | | | | | | imsm distinguishes parity initialization from parity checking in the metadata. Older option roms marked the repair operation with the 'verify' type and a 'with fixup' flag in the raid device 'status' field. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: fix imsm_map.num_domainsDan Williams2009-04-121-5/+6
| | | | | | | | | | 'num_domains' is the number of parity domains. I.e. 2 in the raid10 case (2-mirrors), while raid0 through raid5 have 1 parity domain (even though raid0 does not have parity). Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: ensure mpb buffer is zeroedDan Williams2009-04-121-2/+5
| | | | | | | | | Don't leak unitialized data into the mpb. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: support --examine --exportDan Williams2009-04-111-0/+16
| | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: make uuid separator consistent with ddfDan Williams2009-04-111-6/+6
| | | | | | | | '-' to ':' Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: extract right-most whitespace stripped serial numberDan Williams2009-04-081-16/+27
| | | | | | | | | According to new documentation the metadata expects that all whitespace (characters <= 0x20) are stripped from the incoming serial number. If the length remains longer than MAX_RAID_SERIAL_LEN then only the right-most characters are preserved. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* Release mdadm-3.0-devel3NeilBrown2009-03-101-1/+1
|
* imsm: display supported chunk sizes in --detail-platformDan Williams2009-02-271-0/+17
| | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: auto layoutDan Williams2009-02-241-7/+103
| | | | | | | | | | | | In support of auto-layout: 1/ collect and merge all extents to find the largest common-start free region 2/ verify that we meet the "all volumes must use the same set of disks" 2/ mark the disks to be added in add_to_super_imsm_volume Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* sysfs: allow sysfs_read to detect and drop removed disksDan Williams2009-02-241-2/+7
| | | | | | | | | | | | | | | All operations that rely on loading from an existing container (like --add) will fail after a disk has been removed. Provide an option to skip missing / offline disks rather than abort. We attempt to do this in the load_super_{imsm,ddf}_all cases when mdmon is running i.e. we already have a consitent version of the metadata running in the system. Otherwise, we fail as normal and let the administrator fix up the container. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: retry load_imsm_mpb if we suspect mdmon has made modificationsDan Williams2009-02-241-3/+14
| | | | | | | | | | If the checksum verification fails and mdmon is running we retry the load to get a consistent snapshot of the mpb. Found by tests/08imsm-overlap. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: verify single sector mpb checksumsDan Williams2009-02-241-0/+11
| | | | | | | If the mpb is only one sector do not skip the checksum verification. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: fix mark_failure / introduce mark_missingDan Williams2009-02-241-19/+80
| | | | | | | | | | | | | | | | | Actually, rename mark_failure to mark_missing and then implement the correct mark_failure which according to new documentation is to: 1/ Set the FAILED status bit 2/ Set IMSM_ORD_REBUILD to mark the disk out of sync 3/ Set map->failed_disk_num if this is the first failure detected failure (it is ~0 otherwise) Previously the assumption was that IMSM_ORD_REBUILD only appeared in map[1], so all routines that care about out-of-sync disks need to be updated. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: introduce get_imsm_disk_slotDan Williams2009-02-241-27/+29
| | | | | | | | | Implement a common disk index to disk slot routine and replace open coded versions. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: fix activate spare to ignore foreign disksDan Williams2009-02-231-9/+10
| | | | | | | | | | | | | | A foreign disk is one that all other drives believe is not-in-sync but does not have the 'failed' status bit set. This also reverts, because that commit is addressing the wrong problem. Ideally mdmon would kick "non-fresh" drives like the kernel does at native-md activation time, but that is too awkward to implement at the moment because mdadm owns container manipulations. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: fixup container spare uuids by defaultDan Williams2009-02-231-1/+29
| | | | | | | | | | | | | Spares in the imsm case are marked with the "match-all" uuid of ffffffff-ffffffff-ffffffff-ffffffff. When performing incremental assembly we need to associate such devices with a populated container uuid. Also when performing --detail on a container with only spares present we can make an attempt to return a real uuid. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: fix missing initializations of the per-disk extents pointerDan Williams2009-02-231-0/+2
| | | | | | | | Fixes a glibc assertion when trying to free a pointer that was not malloc'd. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: provide a simulated option-rom for regression testsDan Williams2009-02-231-1/+1
| | | | | | | | | | | IMSM_NO_PLATFORM turns off checks that should be tested, so provide a IMSM_TEST_OROM variable to allow testing the orom constraints in the mdadm regression suite. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: block creation of devices with identical namesDan Williams2009-02-021-0/+11
| | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: don't check raid1 chunk sizeDan Williams2009-02-021-1/+2
| | | | | | | | | | | | | | mdadm -C /dev/md/r1d2n1s0-5 -amd -l1 --size 5242880 -n 2 /dev/sdb /dev/sdc -R -f -v -c 64 mdadm: chunk size ignored for this level mdadm: super0.90 cannot open /dev/sdb: Device or resource busy mdadm: super1.x cannot open /dev/sdb: Device or resource busy mdadm: platform does not support a chunk size of: 0 mdadm: device /dev/sdb not suitable for any style of array Reported-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com> Tested-by: Jacek Danecki <jacek.danecki@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: fix failed disks are allowed back into the containerDan Williams2009-01-231-1/+4
| | | | | | | | | Failed disks do not have valid serial numbers which means we will not pick up the 'failed' status bit from the metadata entry. Check for dl->index == -2 to prevent failed disks from being incorporated into the container. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* Create: warn when a metadata format's platform components are missingDan Williams2009-01-201-1/+7
| | | | | | | | | | | | | | If the metadata handler can not find its platform support components then there is no way for it to verify that the raid configuration will be supported by the option-rom. Provide a generic method for metadata handlers to warn the user that the array they are about to create may not work as intended with a given platform. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: enforce "all member disks must be members of all arrays"Dan Williams2009-01-201-29/+71
| | | | | | | | | | | | | | | | | | | | | | | This is a key orom-compatibility constraint. A nice side effect is that it precludes the corner case of 'create' racing against 'spare activate' since the create will fail to convert a spare into an array member. At create time we check if this is the first member array in the container if it is than all disks are possible candidates, if it is not then only current members are permitted. A bit hairier is spare-activation handling in the presence of this constraint. It is difficult because spare handling is per array. The approach taken is to: 1/ check that a new spare can cover all defined arrays in the container 2/ ensure that partially assimilated spares are the first candidates when looking for a spare region to activate. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: enforce num_disks constraintsDan Williams2009-01-201-5/+5
| | | | | | | | | | RAID1 == 2 disks RAID5 >= 3 disks RAID10 == 4 disks Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: rename vprintf macro to pr_vrbDan Williams2009-01-201-6/+6
| | | | | | | | Don't redefine standard library calls unecessarily... Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* Create: allow per-metadata default layoutsDan Williams2009-01-201-1/+2
| | | | | | | | Let handlers specifiy their own defaults, specifically needed for the imsm-raid5 case where mdadm defaults to 'ls' and imsm to 'la'. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: imsm_read_serial check for zero-length responseDan Williams2009-01-201-0/+7
| | | | | | VMWare virtual disks successfully run the inquiry but return a zero response. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: fix dev_open return value handlingDan Williams2009-01-201-3/+3
| | | | | | dev_open returns an fd Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* Merge branch 'devel' of ↵NeilBrown2008-12-181-109/+736
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/djbw/mdadm into devel-3.0
| * 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-081-0/+1
| | | | | | | | | | | | | | 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-081-10/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: 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>
* | Create: support autolayout when creating in a DDFNeilBrown2008-12-041-0/+8
| | | | | | | | | | | | | | | | | | 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-041-1/+1
|/ | | | | | That way it is the same a *freesize, and generally less confusing. 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-271-1/+9
| | | | | | | 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-271-8/+10
| | | | | | Prepare add_to_super to validate disks against the platform capabilities 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>