| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Sometimes I forget to stop arrays at the end of scripts, and
that shows errors in the next script, which is confusing.
|
|
|
|
| |
Also go direct from subarray to text_version.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
... so that it cannot be stopped while there are active arrays.
I don't know where that second 'close' came from ....
|
| |
|
| |
|
|
|
|
|
| |
Support creating arrays inside an active ddf container by
sending a metadata update over a pipe to mdmon.
|
|
|
|
| |
More here
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
So only 'super0' is externally visible.
|
|
|
|
|
| |
It is simpler if there is just one, and the methods
make decisions as appropriate.
|
|
|
|
| |
Use 'info pointer is NULL' instead.
|
|
|
|
|
| |
Getting close to a sensible description of what some of the
superswitch methods are supposed to do!
|
|
|
|
| |
It doesn't mean anything and is never used.
|
|
|
|
|
|
|
|
|
| |
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].
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
It isn't generally meaningful.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
Yes, we do want to free the buf, and the space too if it is still
there.
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| | |
git://git.kernel.org/pub/scm/linux/kernel/git/djbw/mdadm into devel-3.0
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\|
| |
| |
| | |
git://git.kernel.org/pub/scm/linux/kernel/git/djbw/mdadm into devel-3.0
|
| |
| |
| |
| | |
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
| |
| |
| |
| | |
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
| |
| |
| |
| |
| |
| | |
Ensure that newly written anchors reflect a consistent metadata block.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
| |
| |
| |
| | |
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
| |
| |
| |
| | |
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| | |
Break out sector_count() for use elsewhere.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
| |
| |
| |
| |
| |
| | |
imsm records this information in its metadata
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
| |
| |
| |
| |
| |
| | |
imsm records and validates this data in its metadata
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
| |
| |
| |
| | |
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
| |
| |
| |
| |
| |
| | |
hostname[17] = 0 overwrites the last byte of the ddf pointer
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
| |
| |
| |
| | |
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
|\ \
| |/
|/|
| |
| |
| | |
Conflicts:
Makefile
|
| |
| |
| |
| |
| |
| |
| | |
From: Chris Webb <chris@arachsys.com>
We are loading into the already-loaded 'st' instead of the
newly create 'tst', which is clearly wrong.
|
| |
| |
| |
| |
| |
| | |
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).
|