summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * Include sysfs.c in mdassemble.autoNeil Brown2008-05-191-3/+5
| | | | | | | | and tidy up Makefile a bit.
| * "make everything" now also makes mdassemble.autoNeil Brown2008-05-192-2/+8
| | | | | | | | | | | | | | This is make MDASSEMBLE_AUTO=1 mdassemble.static so we now find compile bugs more easily.
* | A kernel patch needed to add a spare to an active external-metadata arraydevelNeil Brown2008-06-121-0/+199
| |
* | Add DDF code for activate_spareNeil Brown2008-06-124-12/+245
| | | | | | | | Plus various bug fixes etc.
* | Support adding a spare to a degraded array.Neil Brown2008-06-124-20/+96
| | | | | | | | | | When signalled by the monitor, the manager will find spares and add them to the array and initiate a recovery.
* | Some fixes to make failures in ddf get handled properly.Neil Brown2008-06-122-7/+7
| |
* | Correctly set resync_start when creating an array.Neil Brown2008-06-121-0/+8
| |
* | DDF: Update array state and disk state properly when adding to a BVDNeil Brown2008-06-121-8/+36
| |
* | super method for updating ddf metadata.Neil Brown2008-06-121-9/+129
| |
* | Allow passing metadata update to the monitor.Neil Brown2008-06-126-7/+80
| | | | | | | | | | | | 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.
* | Store and recover spare_assign info in DDF.Neil Brown2008-06-121-8/+24
| |
* | Add mppe and conf_rec_len to struct super_ddfNeil Brown2008-06-121-30/+24
| | | | | | | | | | Rather than having to pull them from inside structures and be_to_cpu them all the time.
* | Don't ignore errors in sysfs_add_disk.Neil Brown2008-06-121-5/+6
| | | | | | | | | | i.e. if the add fails, don't add the device to the internal data structures.
* | Fix some stuff.Neil Brown2008-05-271-3/+9
| |
* | Parse the 'instance' part of external:/mdXX/INST in metadata handler.Neil Brown2008-05-274-19/+24
| | | | | | | | This give more flexability.
* | Discard st->container_memberNeil Brown2008-05-274-14/+12
| | | | | | | | | | | | 'container_member' isn't really a well defined concept. Each metadata might enumerate members differently, so just let each format /mdX/YYYY as appropriate.
* | Remove st->text_version in favour of info->text_versionNeil Brown2008-05-276-30/+30
| | | | | | | | | | | | | | 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-274-23/+39
| | | | | | | | DDF needs more fine grained understanding of the array state.
* | Discard get_sync_pos. We should be using get_resync_start.Neil Brown2008-05-273-23/+3
| | | | | | | | | | | | | | | | | | "sync_complete" just tracks the current resync/recover/check/whatever pass. "resync_start" tracks which parts of the array are known to be in-sync (modulo active writes). So it is what we need to use to update the metadata. Also we cannot call it when the array has stopped, as the value is no longer available then. We must call it when the resync completes. Possibly also call it preiodically if the array is quiescent.
* | Start mdmon during incremental assembly of containerNeil Brown2008-05-272-0/+25
| |
* | allow --incremental to reuse devices that already existNeil Brown2008-05-272-1/+43
| | | | | | | | .. and other fixes.
* | auto-start mdmon on --createNeil Brown2008-05-273-15/+132
| | | | | | | | | | | | FIXME uses sill hardcoded path. Need --assemble too.
* | Exit when there are no more arrays to manage.Neil Brown2008-05-275-3/+39
| |
* | Remove supertype->devfdNeil Brown2008-05-272-2/+1
| | | | | | | | It is never used.
* | Remove stopped arrays.Neil Brown2008-05-275-24/+76
| | | | | | | | | | | | When an array becomes inactive, clean up and forget it. This involves signalling the manager.
* | Set status of devices in ddf.Neil Brown2008-05-272-20/+179
| | | | | | | | Might work a little bit....
* | Implement mark_clean for ddf and remove mark_dirty and mark_syncNeil Brown2008-05-274-62/+42
| | | | | | | | | | | | | | 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.
* | Initialise newly allocated active_array better.Neil Brown2008-05-271-0/+2
| | | | | | | | Just set it all to zeros. ->devs in particular needs to be 0.
* | Discard 'array_list' in mdmonNeil Brown2008-05-273-6/+3
| | | | | | | | The container has an ->arrays field that we should be using.
* | 'errno' is a positive number, not negative.Neil Brown2008-05-271-1/+1
| | | | | | | | I've been living in the kernel too long ;-)
* | Remember to close directories when we are finished with them.Neil Brown2008-05-272-1/+5
| |
* | Alway use a unique file name for opendevNeil Brown2008-05-271-1/+2
| | | | | | | | Else mdadm and mdmon running in parallel can tread on each other.
* | Remove 'fd' arg from sysfs_add_diskNeil Brown2008-05-275-25/+13
| | | | | | | | | | It it never used, and removing means there are several 'open's that can go.
* | Remove stray semicolonNeil Brown2008-05-271-1/+1
| | | | | | | | Causes compile error with gcc-2.95
* | Fix some initialisations...Neil Brown2008-05-151-0/+4
| |
* | close some memory leaksDan Williams2008-05-152-0/+4
| | | | | | | | | | | | From: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | add infrastructure to receive higher order commands, like remove_deviceDan Williams2008-05-156-24/+125
| | | | | | | | | | | | | | | | | | | | | | From: Dan Williams <dan.j.williams@intel.com> Each md_message encapsulates a single command. A command includes an 'action' member which describes what if any data comes after the action. Communication with the monitor involves updating the active_cmd pointer and then writing to mgr_pipe. Pass/fail status is returned via mon_pipe. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | start fleshing out socket code, ping monitor to see if it is aliveDan Williams2008-05-154-9/+83
| | | | | | | | | | | | From: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | when failures happen they should be propagated to all member arraysDan Williams2008-05-151-3/+43
| | | | | | | | | | | | From: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | handle disk failuresDan Williams2008-05-154-21/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-152-2/+2
| | | | | | | | | | | | From: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Flag arrays for deletion after they have been stopped.Dan Williams2008-05-152-16/+44
| | | | | | | | | | | | | | | | | | From: Dan Williams <dan.j.williams@intel.com> If they are later reassembled they will be replaced and deallocated via replace_array. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | handle resync completionDan Williams2008-05-154-4/+16
| | | | | | | | | | | | 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
| |
* | start resync when transitioning from initial readonly stateDan Williams2008-05-153-7/+27
| | | | | | | | | | | | | | | | | | From: Dan Williams <dan.j.williams@intel.com> mdadm handles setting resync_start, monitor uses this value to determine whether to set the 'active' or 'readauto' state. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Merge mdmonNeil Brown2008-05-159-19/+1101
| |
* | handle Manage_subdevs() for 'external' arraysDan Williams2008-05-156-5/+382
| | | | | | | | | | | | | | | | | | From: Dan Williams <dan.j.williams@intel.com> 1/ Block attempts to add/remove devices from container members 2/ Forward add/remove requests to containers Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | set resync_start in Incremental_containerDan Williams2008-05-153-0/+7
| | | | | | | | | | | | | | | | | | | | 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: create supportDan Williams2008-05-151-2/+2
| | | | | | | | | | | | | | | | | | From: Dan Williams <dan.j.williams@intel.com> This should probably be made into a generic 'external' capability rather than hardcoding 'ddf' and 'imsm'. Signed-off-by: Dan Williams <dan.j.williams@intel.com>