]> git.ipfire.org Git - thirdparty/mdadm.git/log
thirdparty/mdadm.git
15 years agoRevise message passing code.
Neil Brown [Sat, 12 Jul 2008 10:27:40 +0000 (20:27 +1000)] 
Revise message passing code.

More here

15 years agoRemove mgr_pipe for communicating from manage to monitor.
Neil Brown [Sat, 12 Jul 2008 10:27:40 +0000 (20:27 +1000)] 
Remove mgr_pipe for communicating from manage to monitor.

Data is being passed in shared memory, so the pipe is only being
use as a wakeup.  This can more easily be done with a thread-signal.

15 years agoRemove mon_pipe for communicating from monitor to manager
Neil Brown [Sat, 12 Jul 2008 10:27:40 +0000 (20:27 +1000)] 
Remove mon_pipe for communicating from monitor to manager

The returned value was never used, and we don't really want
this return path anyway as writing to a pipe could conceivably
block, and the monitor must not block.

15 years agoHandle device removal from container
Neil Brown [Sat, 12 Jul 2008 10:27:40 +0000 (20:27 +1000)] 
Handle device removal from container

This really should be done in mdadm, not mdmon.
We ensure the device won't be suddenly commited as a hot-spare
using O_EXCL, then check the 'holders' sysfs directory
to make sure it is only in use once.

15 years agoFix kernel patch
Neil Brown [Sat, 12 Jul 2008 10:27:39 +0000 (20:27 +1000)] 
Fix kernel patch

15 years agoMake super super0.c function static.
Neil Brown [Sat, 12 Jul 2008 10:27:39 +0000 (20:27 +1000)] 
Make super super0.c function static.

So only 'super0' is externally visible.

15 years agoRemove the multiple super_switchs for ddf.
Neil Brown [Sat, 12 Jul 2008 10:27:39 +0000 (20:27 +1000)] 
Remove the multiple super_switchs for ddf.

It is simpler if there is just one, and the methods
make decisions as appropriate.

15 years agoRemove silly convention that major='-1' means 'zero superblock'.
Neil Brown [Sat, 12 Jul 2008 10:27:39 +0000 (20:27 +1000)] 
Remove silly convention that major='-1' means 'zero superblock'.

Use 'info pointer is NULL' instead.

15 years agoRemove getinfo_super_n and do some other cleaning up.
Neil Brown [Sat, 12 Jul 2008 10:27:39 +0000 (20:27 +1000)] 
Remove getinfo_super_n and do some other cleaning up.

Getting close to a sensible description of what some of the
superswitch methods are supposed to do!

15 years agoExternal metadata shouldn't set array.*_version
Neil Brown [Sat, 12 Jul 2008 10:27:39 +0000 (20:27 +1000)] 
External metadata shouldn't set array.*_version

It doesn't mean anything and is never used.

15 years agoAdd subarray field to supertype.
Neil Brown [Sat, 12 Jul 2008 10:27:38 +0000 (20:27 +1000)] 
Add subarray field to supertype.

When loading the metadata for a subarray (super_by_fd), we set
->subarray to be the name read from md/metadata_version so that
getinfo_super can return info about the correct array.

With this we can differentiate between a container and
an array within the container by looking at ->subarray[0].

15 years agoAdd some comments to explain some of the bits of superswitch.
Neil Brown [Sat, 12 Jul 2008 10:27:38 +0000 (20:27 +1000)] 
Add some comments to explain some of the bits of superswitch.

15 years agoHide subordinate superswitch structures.
Neil Brown [Sat, 12 Jul 2008 10:27:38 +0000 (20:27 +1000)] 
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.

15 years agoRemove 'major' from superswitch.
Neil Brown [Sat, 12 Jul 2008 10:27:37 +0000 (20:27 +1000)] 
Remove 'major' from superswitch.

It isn't generally meaningful.

15 years agoUse text_version in map_file rather than major.minor.
Neil Brown [Sat, 12 Jul 2008 10:27:37 +0000 (20:27 +1000)] 
Use text_version in map_file rather than major.minor.

15 years agoAssorted cleanups to DDF
Neil Brown [Sat, 12 Jul 2008 10:27:37 +0000 (20:27 +1000)] 
Assorted cleanups to DDF

15 years agoFix write_init_super usage when hot-adding a spare
Neil Brown [Sat, 12 Jul 2008 10:27:36 +0000 (20:27 +1000)] 
Fix write_init_super usage when hot-adding a spare

Using write_init_super to add a spare to an active array is quite
different to how it is used when creating an array.

It mostly works, but if we are adding two devices to an array,
then when we add the second, there are still traces of the first
which confuse write_init_super.

So get write_init_super to ignore those traces.  Longer term, we
probably want to do this differently as for DDF, hot-adding to
an active array will have to be quite different - it will want to
write to all metadata, possibly via mdmon.

15 years agoAlways zero a struct ddf_super on allocation.
Neil Brown [Sat, 12 Jul 2008 10:27:36 +0000 (20:27 +1000)] 
Always zero a struct ddf_super on allocation.

15 years agoAlways initialise a struct super_type to zero
Neil Brown [Sat, 12 Jul 2008 10:27:36 +0000 (20:27 +1000)] 
Always initialise a struct super_type to zero

15 years agoFix freeing of updates that have been handled by monitor.
Neil Brown [Sat, 12 Jul 2008 10:27:33 +0000 (20:27 +1000)] 
Fix freeing of updates that have been handled by monitor.

Yes, we do want to free the buf, and the space too if it is still
there.

15 years agoAlways assume_clean for raid0, linear, multipath, faulty
Neil Brown [Thu, 10 Jul 2008 22:50:06 +0000 (08:50 +1000)] 
Always assume_clean for raid0, linear, multipath, faulty

For arrays that don't have redundancy (raid0, linear etc), the
clean/dirty distinction doesn't mean anything.  So always
'assume clean' for these arrays.

15 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/mdadm...
Neil Brown [Fri, 20 Jun 2008 05:13:27 +0000 (15:13 +1000)] 
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/mdadm into devel-3.0

15 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/mdadm...
Neil Brown [Thu, 19 Jun 2008 06:41:25 +0000 (16:41 +1000)] 
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/mdadm into devel-3.0

15 years agoMerge branch 'master' into devel-3.0
Neil Brown [Thu, 19 Jun 2008 06:38:37 +0000 (16:38 +1000)] 
Merge branch 'master' into devel-3.0

Conflicts:

Makefile

15 years agoFix bug in forced assemble.
Chris Webb [Thu, 19 Jun 2008 06:30:39 +0000 (16:30 +1000)] 
Fix bug in forced assemble.

From: Chris Webb <chris@arachsys.com>

We are loading into the already-loaded 'st' instead of the
newly create 'tst', which is clearly wrong.

15 years agoFix an error when assembling arrays that are in the middle of a reshape.
Neil Brown [Thu, 19 Jun 2008 06:30:36 +0000 (16:30 +1000)] 
Fix an error when assembling arrays that are in the middle of a reshape.

It is important that dup_super always returns an 'st' with the same
->ss and ->minor_version as the st that was passed.
This wasn't happening for 0.91 metadata (i.e. in the middle of a reshape).

15 years agomdmon: add debug print statements for profiling mdmon
Dan Williams [Mon, 16 Jun 2008 22:50:07 +0000 (15:50 -0700)] 
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>
15 years agoimsm: set map state depending on sync state
Dan Williams [Mon, 16 Jun 2008 22:36:41 +0000 (15:36 -0700)] 
imsm: set map state depending on sync state

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoimsm: reenable mdmon
Dan Williams [Mon, 16 Jun 2008 22:36:41 +0000 (15:36 -0700)] 
imsm: reenable mdmon

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoimsm: write anchor last
Dan Williams [Mon, 16 Jun 2008 22:36:41 +0000 (15:36 -0700)] 
imsm: write anchor last

Ensure that newly written anchors reflect a consistent metadata block.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoimsm: implement store_zero_imsm and init_zero_imsm
Dan Williams [Mon, 16 Jun 2008 22:36:40 +0000 (15:36 -0700)] 
imsm: implement store_zero_imsm and init_zero_imsm

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoimsm: ->getinfo_super set raid_disk to disk.number
Dan Williams [Mon, 16 Jun 2008 22:36:40 +0000 (15:36 -0700)] 
imsm: ->getinfo_super set raid_disk to disk.number

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>
15 years agoimsm: add 'Create' support
Dan Williams [Mon, 16 Jun 2008 22:36:38 +0000 (15:36 -0700)] 
imsm: add 'Create' support

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoimsm: 'volume' is the proper name for imsm container members
Dan Williams [Sat, 14 Jun 2008 00:42:09 +0000 (17:42 -0700)] 
imsm: 'volume' is the proper name for imsm container members

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoimsm: ->container_dev needs to be set in load_super_imsm_all
Dan Williams [Sat, 14 Jun 2008 00:42:09 +0000 (17:42 -0700)] 
imsm: ->container_dev needs to be set in load_super_imsm_all

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>
15 years agoimsm: add 'mpb_size' to --examine output
Dan Williams [Sat, 14 Jun 2008 00:42:09 +0000 (17:42 -0700)] 
imsm: add 'mpb_size' to --examine output

Break out sector_count() for use elsewhere.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agosysfs: helper routine to retrieve the scsi id
Dan Williams [Sat, 14 Jun 2008 00:27:30 +0000 (17:27 -0700)] 
sysfs: helper routine to retrieve the scsi id

imsm records this information in its metadata

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agosysfs: provide a helper function for locating scsi_generic interfaces
Dan Williams [Sat, 14 Jun 2008 00:27:30 +0000 (17:27 -0700)] 
sysfs: provide a helper function for locating scsi_generic interfaces

imsm records and validates this data in its metadata

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoddf: fix up validate_geometry to ignore other containers
Dan Williams [Sat, 14 Jun 2008 00:27:30 +0000 (17:27 -0700)] 
ddf: fix up validate_geometry to ignore other containers

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoddf: fix 'ddf' pointer corruption
Dan Williams [Sat, 14 Jun 2008 00:27:30 +0000 (17:27 -0700)] 
ddf: fix 'ddf' pointer corruption

hostname[17] = 0 overwrites the last byte of the ddf pointer

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoddf: convert size paramter to sectors when calling avail_size_ddf
Dan Williams [Sat, 14 Jun 2008 00:27:30 +0000 (17:27 -0700)] 
ddf: convert size paramter to sectors when calling avail_size_ddf

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoA kernel patch needed to add a spare to an active external-metadata array devel
Neil Brown [Thu, 12 Jun 2008 02:06:14 +0000 (12:06 +1000)] 
A kernel patch needed to add a spare to an active external-metadata array

15 years agoAdd DDF code for activate_spare
Neil Brown [Thu, 12 Jun 2008 00:13:32 +0000 (10:13 +1000)] 
Add DDF code for activate_spare

Plus various bug fixes etc.

15 years agoSupport adding a spare to a degraded array.
Neil Brown [Thu, 12 Jun 2008 00:13:29 +0000 (10:13 +1000)] 
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.

15 years agoSome fixes to make failures in ddf get handled properly.
Neil Brown [Thu, 12 Jun 2008 00:13:28 +0000 (10:13 +1000)] 
Some fixes to make failures in ddf get handled properly.

15 years agoCorrectly set resync_start when creating an array.
Neil Brown [Thu, 12 Jun 2008 00:13:26 +0000 (10:13 +1000)] 
Correctly set resync_start when creating an array.

15 years agoDDF: Update array state and disk state properly when adding to a BVD
Neil Brown [Thu, 12 Jun 2008 00:13:25 +0000 (10:13 +1000)] 
DDF: Update array state and disk state properly when adding to a BVD

15 years agosuper method for updating ddf metadata.
Neil Brown [Thu, 12 Jun 2008 00:13:24 +0000 (10:13 +1000)] 
super method for updating ddf metadata.

15 years agoAllow passing metadata update to the monitor.
Neil Brown [Thu, 12 Jun 2008 00:13:23 +0000 (10:13 +1000)] 
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.

15 years agoStore and recover spare_assign info in DDF.
Neil Brown [Thu, 12 Jun 2008 00:13:22 +0000 (10:13 +1000)] 
Store and recover spare_assign info in DDF.

15 years agoAdd mppe and conf_rec_len to struct super_ddf
Neil Brown [Thu, 12 Jun 2008 00:13:20 +0000 (10:13 +1000)] 
Add mppe and conf_rec_len to struct super_ddf

Rather than having to pull them from inside structures and
be_to_cpu them all the time.

15 years agoDon't ignore errors in sysfs_add_disk.
Neil Brown [Thu, 12 Jun 2008 00:13:19 +0000 (10:13 +1000)] 
Don't ignore errors in sysfs_add_disk.

i.e. if the add fails, don't add the device to the internal data
structures.

15 years agoRelease 2.6.7 mdadm-2.6.7
Neil Brown [Fri, 6 Jun 2008 06:07:11 +0000 (16:07 +1000)] 
Release 2.6.7

15 years agoAvoid NULL reference calling free_super and elsewhere.
Neil Brown [Tue, 27 May 2008 07:23:16 +0000 (17:23 +1000)] 
Avoid NULL reference calling free_super and elsewhere.

Since we made free_super a superswitch call, we need to be careful
that st is non NULL before calling st->ss->free_super(st).
Also when updating byteorder there is a chance of a similar NULL
deref.

15 years agoRemove stray semicolon
Neil Brown [Tue, 27 May 2008 07:23:09 +0000 (17:23 +1000)] 
Remove stray semicolon

Causes compile error with gcc-2.95

15 years agoFix some stuff.
Neil Brown [Mon, 26 May 2008 23:18:58 +0000 (09:18 +1000)] 
Fix some stuff.

15 years agoParse the 'instance' part of external:/mdXX/INST in metadata handler.
Neil Brown [Mon, 26 May 2008 23:18:57 +0000 (09:18 +1000)] 
Parse the 'instance' part of external:/mdXX/INST in metadata handler.

This give more flexability.

15 years agoDiscard st->container_member
Neil Brown [Mon, 26 May 2008 23:18:56 +0000 (09:18 +1000)] 
Discard st->container_member

'container_member' isn't really a well defined concept.
Each metadata might enumerate members differently, so just
let each format /mdX/YYYY as appropriate.

15 years agoRemove st->text_version in favour of info->text_version
Neil Brown [Mon, 26 May 2008 23:18:55 +0000 (09:18 +1000)] 
Remove st->text_version in favour of info->text_version

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.

15 years agoChange mark_clean to set_array_state.
Neil Brown [Mon, 26 May 2008 23:18:54 +0000 (09:18 +1000)] 
Change mark_clean to set_array_state.

DDF needs more fine grained understanding of the array state.

15 years agoDiscard get_sync_pos. We should be using get_resync_start.
Neil Brown [Mon, 26 May 2008 23:18:53 +0000 (09:18 +1000)] 
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.

15 years agoStart mdmon during incremental assembly of container
Neil Brown [Mon, 26 May 2008 23:18:52 +0000 (09:18 +1000)] 
Start mdmon during incremental assembly of container

15 years agoallow --incremental to reuse devices that already exist
Neil Brown [Mon, 26 May 2008 23:18:43 +0000 (09:18 +1000)] 
allow --incremental to reuse devices that already exist

.. and other fixes.

15 years agoauto-start mdmon on --create
Neil Brown [Mon, 26 May 2008 23:18:42 +0000 (09:18 +1000)] 
auto-start mdmon on --create

FIXME uses sill hardcoded path.

Need --assemble too.

15 years agoExit when there are no more arrays to manage.
Neil Brown [Mon, 26 May 2008 23:18:41 +0000 (09:18 +1000)] 
Exit when there are no more arrays to manage.

15 years agoRemove supertype->devfd
Neil Brown [Mon, 26 May 2008 23:18:40 +0000 (09:18 +1000)] 
Remove supertype->devfd

It is never used.

15 years agoRemove stopped arrays.
Neil Brown [Mon, 26 May 2008 23:18:39 +0000 (09:18 +1000)] 
Remove stopped arrays.

When an array becomes inactive, clean up and forget it.

This involves signalling the manager.

15 years agoSet status of devices in ddf.
Neil Brown [Mon, 26 May 2008 23:18:38 +0000 (09:18 +1000)] 
Set status of devices in ddf.

Might work a little bit....

15 years agoImplement mark_clean for ddf and remove mark_dirty and mark_sync
Neil Brown [Mon, 26 May 2008 23:18:38 +0000 (09:18 +1000)] 
Implement mark_clean for ddf and remove mark_dirty and mark_sync

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.

15 years agoInitialise newly allocated active_array better.
Neil Brown [Mon, 26 May 2008 23:18:37 +0000 (09:18 +1000)] 
Initialise newly allocated active_array better.

Just set it all to zeros.  ->devs in particular needs to be 0.

15 years agoDiscard 'array_list' in mdmon
Neil Brown [Mon, 26 May 2008 23:18:36 +0000 (09:18 +1000)] 
Discard 'array_list' in mdmon

The container has an ->arrays field that we should be using.

15 years ago'errno' is a positive number, not negative.
Neil Brown [Mon, 26 May 2008 23:18:35 +0000 (09:18 +1000)] 
'errno' is a positive number, not negative.

I've been living in the kernel too long ;-)

15 years agoRemember to close directories when we are finished with them.
Neil Brown [Mon, 26 May 2008 23:18:34 +0000 (09:18 +1000)] 
Remember to close directories when we are finished with them.

15 years agoAlway use a unique file name for opendev
Neil Brown [Mon, 26 May 2008 23:18:33 +0000 (09:18 +1000)] 
Alway use a unique file name for opendev

Else mdadm and mdmon running in parallel can tread on each other.

15 years agoRemove 'fd' arg from sysfs_add_disk
Neil Brown [Mon, 26 May 2008 23:18:32 +0000 (09:18 +1000)] 
Remove 'fd' arg from sysfs_add_disk

It it never used, and removing means there are several 'open's that can
go.

15 years agoRemove stray semicolon
Neil Brown [Mon, 26 May 2008 23:18:31 +0000 (09:18 +1000)] 
Remove stray semicolon

Causes compile error with gcc-2.95

15 years agoFix autoassemble for stack arrays.
Neil Brown [Tue, 20 May 2008 06:28:48 +0000 (16:28 +1000)] 
Fix autoassemble for stack arrays.

If you have stacked arrays, then
  mdadm -As --homehost=fred
should work but doesn't.  It gets into an infinite loop!

So write some tests, and fix the bugs.

15 years agoRelease 2.6.6 mdadm-2.6.6
Neil Brown [Mon, 19 May 2008 02:07:54 +0000 (12:07 +1000)] 
Release 2.6.6

15 years agoRemove outdated HOWTO link and credit Jakob's contribution.
David Greaves [Mon, 19 May 2008 02:07:50 +0000 (12:07 +1000)] 
Remove outdated HOWTO link and credit Jakob's contribution.

From: David Greaves <david@dgreaves.com>

Signed-off-by: David Greaves <david@dgreaves.com>
15 years agoInclude sysfs.c in mdassemble.auto
Neil Brown [Mon, 19 May 2008 02:07:47 +0000 (12:07 +1000)] 
Include sysfs.c in mdassemble.auto

and tidy up Makefile a bit.

15 years ago"make everything" now also makes mdassemble.auto
Neil Brown [Mon, 19 May 2008 02:07:43 +0000 (12:07 +1000)] 
"make everything" now also makes mdassemble.auto

This is
  make MDASSEMBLE_AUTO=1 mdassemble.static

so we now find compile bugs more easily.

15 years agoFix some initialisations...
Neil Brown [Thu, 15 May 2008 06:48:57 +0000 (16:48 +1000)] 
Fix some initialisations...

15 years agoclose some memory leaks
Dan Williams [Thu, 15 May 2008 06:48:56 +0000 (16:48 +1000)] 
close some memory leaks

From: Dan Williams <dan.j.williams@intel.com>

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoadd infrastructure to receive higher order commands, like remove_device
Dan Williams [Thu, 15 May 2008 06:48:54 +0000 (16:48 +1000)] 
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>
15 years agostart fleshing out socket code, ping monitor to see if it is alive
Dan Williams [Thu, 15 May 2008 06:48:52 +0000 (16:48 +1000)] 
start fleshing out socket code, ping monitor to see if it is alive

From: Dan Williams <dan.j.williams@intel.com>

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agowhen failures happen they should be propagated to all member arrays
Dan Williams [Thu, 15 May 2008 06:48:51 +0000 (16:48 +1000)] 
when failures happen they should be propagated to all member arrays

From: Dan Williams <dan.j.williams@intel.com>

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agohandle disk failures
Dan Williams [Thu, 15 May 2008 06:48:49 +0000 (16:48 +1000)] 
handle disk failures

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>
15 years agoimsm: update metadata for dirty -> clean or resync -> idle events
Dan Williams [Thu, 15 May 2008 06:48:47 +0000 (16:48 +1000)] 
imsm: update metadata for dirty -> clean or resync -> idle events

From: Dan Williams <dan.j.williams@intel.com>

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agokeep member disk fd(s) for updates
Dan Williams [Thu, 15 May 2008 06:48:46 +0000 (16:48 +1000)] 
keep member disk fd(s) for updates

From: Dan Williams <dan.j.williams@intel.com>

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoFlag arrays for deletion after they have been stopped.
Dan Williams [Thu, 15 May 2008 06:48:44 +0000 (16:48 +1000)] 
Flag arrays for deletion after they have been stopped.

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>
15 years agohandle resync completion
Dan Williams [Thu, 15 May 2008 06:48:42 +0000 (16:48 +1000)] 
handle resync completion

From: Dan Williams <dan.j.williams@intel.com>

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoAdd mdmon functions to super-intel.
Neil Brown [Thu, 15 May 2008 06:48:41 +0000 (16:48 +1000)] 
Add mdmon functions to super-intel.

15 years agostart resync when transitioning from initial readonly state
Dan Williams [Thu, 15 May 2008 06:48:39 +0000 (16:48 +1000)] 
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>
15 years agoMerge mdmon
Neil Brown [Thu, 15 May 2008 06:48:37 +0000 (16:48 +1000)] 
Merge mdmon

15 years agohandle Manage_subdevs() for 'external' arrays
Dan Williams [Thu, 15 May 2008 06:48:35 +0000 (16:48 +1000)] 
handle Manage_subdevs() for 'external' arrays

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>
15 years agoset resync_start in Incremental_container
Dan Williams [Thu, 15 May 2008 06:48:33 +0000 (16:48 +1000)] 
set resync_start in Incremental_container

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>
15 years agoimsm: create support
Dan Williams [Thu, 15 May 2008 06:48:32 +0000 (16:48 +1000)] 
imsm: create support

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>
15 years agoimsm: assemble raid devices
Dan Williams [Thu, 15 May 2008 06:48:27 +0000 (16:48 +1000)] 
imsm: assemble raid devices

From: Dan Williams <dan.j.williams@intel.com>

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoSet 'metadata_version' for container_member in Incremental_container
Dan Williams [Thu, 15 May 2008 06:48:25 +0000 (16:48 +1000)] 
Set 'metadata_version' for container_member in Incremental_container

From: Dan Williams <dan.j.williams@intel.com>

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoimsm: assemble container support
Dan Williams [Thu, 15 May 2008 06:48:24 +0000 (16:48 +1000)] 
imsm: assemble container support

From: Dan Williams <dan.j.williams@intel.com>

Signed-off-by: Dan Williams <dan.j.williams@intel.com>