Commit Graph

10 Commits

Author SHA1 Message Date
Neil Brown 0063ecba3d Hide subordinate superswitch structures.
Only one superswitch should be externally visible for each
general type.  Others which handle different flavours
(e.g. container/data-array) should be internal only.
2008-07-12 20:27:38 +10:00
Dan Williams 4e6e574a3e mdmon: add debug print statements for profiling mdmon
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>
2008-06-16 15:50:07 -07:00
Neil Brown 6c3fb95c44 Support adding a spare to a degraded array.
When signalled by the monitor, the manager will find spares and
add them to the array and initiate a recovery.
2008-06-12 10:13:29 +10:00
Neil Brown 2e735d1982 Allow passing metadata update to the monitor.
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.
2008-06-12 10:13:23 +10:00
Neil Brown 77402e5105 Discard get_sync_pos. We should be using get_resync_start.
"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.
2008-05-27 09:18:53 +10:00
Neil Brown e0d6609fe6 Exit when there are no more arrays to manage. 2008-05-27 09:18:41 +10:00
Neil Brown 5d19760db0 Discard 'array_list' in mdmon
The container has an ->arrays field that we should be using.
2008-05-27 09:18:36 +10:00
Dan Williams 3e70c845e2 add infrastructure to receive higher order commands, like remove_device
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>
2008-05-15 16:48:54 +10:00
Dan Williams c052ba301b start resync when transitioning from initial readonly state
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>
2008-05-15 16:48:39 +10:00
Neil Brown 549e9569c6 Merge mdmon 2008-05-15 16:48:37 +10:00