summaryrefslogtreecommitdiffstats
path: root/super-intel.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove 'major' from superswitch.Neil Brown2008-07-121-3/+0
| | | | It isn't generally meaningful.
* Always initialise a struct super_type to zeroNeil Brown2008-07-121-0/+2
|
* mdmon: add debug print statements for profiling mdmonDan Williams2008-06-161-4/+4
| | | | | | | for development only as console output can block leading to monitor deadlocks in low mem situations Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: set map state depending on sync stateDan Williams2008-06-161-16/+32
| | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: write anchor lastDan Williams2008-06-161-13/+12
| | | | | | Ensure that newly written anchors reflect a consistent metadata block. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: implement store_zero_imsm and init_zero_imsmDan Williams2008-06-161-3/+13
| | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: ->getinfo_super set raid_disk to disk.numberDan Williams2008-06-161-26/+8
| | | | | | | | | | | | A spare device by definition will have raid_disk set to -1, but when assembling the container we want this disk to by included. Fixes a SIGSEGV when doing: mdadm -A /dev/imsm -e imsm /dev/sd[b-e] ...where /dev/sde is marked as a global spare device Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: add 'Create' supportDan Williams2008-06-161-72/+577
| | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: 'volume' is the proper name for imsm container membersDan Williams2008-06-131-21/+21
| | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: ->container_dev needs to be set in load_super_imsm_allDan Williams2008-06-131-0/+1
| | | | | | | It is used later by container_content_imsm to determine set the text_version of the member arrays. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: add 'mpb_size' to --examine outputDan Williams2008-06-131-3/+7
| | | | | | Break out sector_count() for use elsewhere. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* sysfs: provide a helper function for locating scsi_generic interfacesDan Williams2008-06-131-10/+3
| | | | | | imsm records and validates this data in its metadata Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* Allow passing metadata update to the monitor.Neil Brown2008-06-121-2/+2
| | | | | | Code in manager can now just call queue_metadata_update with a (freeable) buf holding the update, and it will get passed to the monitor and written out.
* Parse the 'instance' part of external:/mdXX/INST in metadata handler.Neil Brown2008-05-271-2/+4
| | | | This give more flexability.
* Remove st->text_version in favour of info->text_versionNeil Brown2008-05-271-3/+10
| | | | | | | I want the metadata handler to have more control over the 'version', particularly for arrays which are members of containers. So discard st->text_version and instead use info->text_version which getinfo_super can initialise.
* Change mark_clean to set_array_state.Neil Brown2008-05-271-4/+5
| | | | DDF needs more fine grained understanding of the array state.
* Implement mark_clean for ddf and remove mark_dirty and mark_syncNeil Brown2008-05-271-41/+4
| | | | | | | mark_dirty is just a special case of mark_clean - with sync_pos == 0. mark_sync is not required. We don't modify the metadata when sync finishes. Only when the array becomes non-writeable at which point we use mark_clean to record how far the resync progressed.
* handle disk failuresDan Williams2008-05-151-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From: Dan Williams <dan.j.williams@intel.com> Added curr_state as a parameter to set_disk. Handlers look at this to record components failures, and set global 'degraded' or 'failed' status. When reading the state as faulty: 1/ mark the disk failed in the metadata 2/ write '-blocked' to the rdev state to allow the kernel's failure mechanism to advance 3/ the kernel will take away the drive's role in remove_and_add_spares() 4/ once the disk no longer has a role writing 'remove' to the rdev state will get the disk out of array. There is a window after writing '-blocked' where the kernel will return -EBUSY to remove requests. We rely on the fact that the disk will continue to show faulty so we lazily wait until the kernel is ready to remove the disk. If the manager thread needs to get the disk out of the way it can ping the monitor and wait, just like the replace_array() case. [buglet fix: swap the parameters of attr_match in read_dev_state] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: update metadata for dirty -> clean or resync -> idle eventsDan Williams2008-05-151-2/+175
| | | | | | From: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* keep member disk fd(s) for updatesDan Williams2008-05-151-1/+1
| | | | | | From: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* handle resync completionDan Williams2008-05-151-0/+6
| | | | | | From: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* Add mdmon functions to super-intel.Neil Brown2008-05-151-0/+35
|
* set resync_start in Incremental_containerDan Williams2008-05-151-0/+5
| | | | | | | | | | From: Dan Williams <dan.j.williams@intel.com> Metadata handlers set mdinfo.resync_start depending on the state of the array. By default mdadm assumes the array is dirty and needs a full resync. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: assemble raid devicesDan Williams2008-05-151-12/+123
| | | | | | From: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: assemble container supportDan Williams2008-05-151-5/+52
| | | | | | From: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: initial Intel(R) Matrix Storage Manager supportDan Williams2008-05-151-0/+1033
From: Dan Williams <dan.j.williams@intel.com> The following now work: --examine --examine --brief Signed-off-by: Dan Williams <dan.j.williams@intel.com>