summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use O_DIRECT for all IO to devices.Neil Brown2008-07-1210-106/+136
| | | | | | | | Using buffered IO risks non-atomic updates to parts of the device that we don't actually want to write to. This isn't in general safe. So switch to O_DIRECT for all that IO and make sure we have properly aligned buffers.
* Stop all arrays before running each test in regression test driver.Neil Brown2008-07-121-0/+2
| | | | | Sometimes I forget to stop arrays at the end of scripts, and that shows errors in the next script, which is confusing.
* ddf: Set container_member from subarray in getinfo_super.Neil Brown2008-07-121-2/+3
| | | | Also go direct from subarray to text_version.
* Reduce the number of metadata updates done by ddf.Neil Brown2008-07-121-7/+43
| | | | | | | | | 1/ track if there are any actual updates pending, and only write metadata when we have changed something. 2/ when writing null virtual-configs, write full blocks, not just the first 4 bytes. This will allow O_DIRECT writes in a subsequent patch.
* Improve shutdown for container-based arrays.Neil Brown2008-07-122-1/+11
| | | | | | | 1/ close a race where multiple arrays disappear at once and monitor isn't woken up to find out that the last one has gone. 2/ "mdadm -Ss" needs to pause briefly for mdmon to exit.
* Keep container device open in monitorNeil Brown2008-07-121-2/+0
| | | | | ... so that it cannot be stopped while there are active arrays. I don't know where that second 'close' came from ....
* Make sure we remove pid file in monitor before manager exits.Neil Brown2008-07-121-1/+1
|
* Remove some noisy printfs.Neil Brown2008-07-122-8/+8
|
* Create arrays via metadata-updateNeil Brown2008-07-126-20/+128
| | | | | Support creating arrays inside an active ddf container by sending a metadata update over a pipe to mdmon.
* Revise message passing code.Neil Brown2008-07-125-169/+110
| | | | More here
* Remove mgr_pipe for communicating from manage to monitor.Neil Brown2008-07-127-98/+48
| | | | | 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.
* Remove mon_pipe for communicating from monitor to managerNeil Brown2008-07-124-11/+2
| | | | | | 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.
* Handle device removal from containerNeil Brown2008-07-127-126/+123
| | | | | | | 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.
* Fix kernel patchNeil Brown2008-07-121-1/+1
|
* Make super super0.c function static.Neil Brown2008-07-121-3/+3
| | | | So only 'super0' is externally visible.
* Remove the multiple super_switchs for ddf.Neil Brown2008-07-122-152/+87
| | | | | It is simpler if there is just one, and the methods make decisions as appropriate.
* Remove silly convention that major='-1' means 'zero superblock'.Neil Brown2008-07-125-16/+9
| | | | Use 'info pointer is NULL' instead.
* Remove getinfo_super_n and do some other cleaning up.Neil Brown2008-07-128-137/+116
| | | | | Getting close to a sensible description of what some of the superswitch methods are supposed to do!
* External metadata shouldn't set array.*_versionNeil Brown2008-07-122-18/+2
| | | | It doesn't mean anything and is never used.
* Add subarray field to supertype.Neil Brown2008-07-128-14/+59
| | | | | | | | | 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].
* Add some comments to explain some of the bits of superswitch.Neil Brown2008-07-121-0/+104
|
* Hide subordinate superswitch structures.Neil Brown2008-07-124-9/+9
| | | | | | 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.
* Remove 'major' from superswitch.Neil Brown2008-07-1210-50/+34
| | | | It isn't generally meaningful.
* Use text_version in map_file rather than major.minor.Neil Brown2008-07-125-21/+22
|
* Assorted cleanups to DDFNeil Brown2008-07-121-132/+157
|
* Fix write_init_super usage when hot-adding a spareNeil Brown2008-07-122-6/+4
| | | | | | | | | | | | | | 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.
* Always zero a struct ddf_super on allocation.Neil Brown2008-07-121-0/+1
|
* Always initialise a struct super_type to zeroNeil Brown2008-07-125-4/+11
|
* Fix freeing of updates that have been handled by monitor.Neil Brown2008-07-122-3/+5
| | | | | Yes, we do want to free the buf, and the space too if it is still there.
* Always assume_clean for raid0, linear, multipath, faultyNeil Brown2008-07-111-0/+2
| | | | | | 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.
* Merge branch 'release' of ↵Neil Brown2008-06-204-7/+62
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/djbw/mdadm into devel-3.0
| * mdmon: add debug print statements for profiling mdmonDan Williams2008-06-164-7/+62
| | | | | | | | | | | | | | 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>
* | Merge branch 'release' of ↵Neil Brown2008-06-195-166/+792
|\| | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/djbw/mdadm into devel-3.0
| * imsm: set map state depending on sync stateDan Williams2008-06-161-16/+32
| | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * imsm: reenable mdmonDan Williams2008-06-161-0/+2
| | | | | | | | 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-132-22/+22
| | | | | | | | 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: helper routine to retrieve the scsi idDan Williams2008-06-132-1/+50
| | | | | | | | | | | | imsm records this information in its metadata Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * sysfs: provide a helper function for locating scsi_generic interfacesDan Williams2008-06-133-11/+69
| | | | | | | | | | | | imsm records and validates this data in its metadata Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * ddf: fix up validate_geometry to ignore other containersDan Williams2008-06-131-3/+3
| | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * ddf: fix 'ddf' pointer corruptionDan Williams2008-06-131-2/+2
| | | | | | | | | | | | hostname[17] = 0 overwrites the last byte of the ddf pointer Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * ddf: convert size paramter to sectors when calling avail_size_ddfDan Williams2008-06-131-1/+1
| | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Merge branch 'master' into devel-3.0Neil Brown2008-06-1914-24/+134
|\ \ | |/ |/| | | | | | | Conflicts: Makefile
| * Fix bug in forced assemble.Chris Webb2008-06-191-1/+1
| | | | | | | | | | | | | | From: Chris Webb <chris@arachsys.com> We are loading into the already-loaded 'st' instead of the newly create 'tst', which is clearly wrong.
| * Fix an error when assembling arrays that are in the middle of a reshape.Neil Brown2008-06-191-1/+4
| | | | | | | | | | | | 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).