| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Prepare add_to_super to validate disks against the platform capabilities
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
|
|
|
|
|
|
| |
When we create our own ddf array, store the homehost in the vendor
information so it can be so to ensure 'LOCAL' name choices.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
| |
Thus an auto-generated config file will list all the arrays.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
| |
It is only 16 bytes, not 32. And is space padded, not nul terminated.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
| |
Now that mdadm.conf doesn't need an array name, we don't need to
give one if the array cannot reliably provide one.
|
|
|
|
|
|
|
| |
All numeric fields in a DDF header big-endian, including the CRC, so
better fix that.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
If an allocation fails in ->prepare_update we need to catch it in
->process_update.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
|
|
|
|
|
|
| |
Both super-ddf and super-intel ignore memory allocation failures during
->activate_spare. Fix these up by cancelling the activation.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
|
|
|
|
|
| |
When a write fails just move on to the next disk.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Made the mistake of recompiling the F9 mdadm rpm which has a patch to
remove -Werror and add "-Wp,-D_FORTIFY_SOURCE -O2" which turns on lots
of errors:
config.c:568: warning: ignoring return value of asprintf
Assemble.c:411: warning: ignoring return value of asprintf
Assemble.c:413: warning: ignoring return value of asprintf
super0.c:549: warning: ignoring return value of posix_memalign
super0.c:742: warning: ignoring return value of posix_memalign
super0.c:812: warning: ignoring return value of posix_memalign
super1.c:692: warning: ignoring return value of posix_memalign
super1.c:1039: warning: ignoring return value of posix_memalign
super1.c:1155: warning: ignoring return value of posix_memalign
super-ddf.c:508: warning: ignoring return value of posix_memalign
super-ddf.c:645: warning: ignoring return value of posix_memalign
super-ddf.c:696: warning: ignoring return value of posix_memalign
super-ddf.c:715: warning: ignoring return value of posix_memalign
super-ddf.c:1476: warning: ignoring return value of posix_memalign
super-ddf.c:1603: warning: ignoring return value of posix_memalign
super-ddf.c:1614: warning: ignoring return value of posix_memalign
super-ddf.c:1842: warning: ignoring return value of posix_memalign
super-ddf.c:2013: warning: ignoring return value of posix_memalign
super-ddf.c:2140: warning: ignoring return value of write
super-ddf.c:2143: warning: ignoring return value of write
super-ddf.c:2147: warning: ignoring return value of write
super-ddf.c:2150: warning: ignoring return value of write
super-ddf.c:2162: warning: ignoring return value of write
super-ddf.c:2169: warning: ignoring return value of write
super-ddf.c:2172: warning: ignoring return value of write
super-ddf.c:2176: warning: ignoring return value of write
super-ddf.c:2181: warning: ignoring return value of write
super-ddf.c:2686: warning: ignoring return value of posix_memalign
super-ddf.c:2690: warning: ignoring return value of write
super-ddf.c:3070: warning: ignoring return value of posix_memalign
super-ddf.c:3254: warning: ignoring return value of posix_memalign
bitmap.c:128: warning: ignoring return value of posix_memalign
mdmon.c:94: warning: ignoring return value of write
mdmon.c:221: warning: ignoring return value of pipe
mdmon.c:327: warning: ignoring return value of write
mdmon.c:330: warning: ignoring return value of chdir
mdmon.c:335: warning: ignoring return value of dup
monitor.c:415: warning: rv may be used uninitialized in this function
...some of these like the write() ones are not so trivial so save those
fixes for the next patch.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
|
|
|
|
|
|
|
| |
md/resync_start reports different terminal values depending on kernel
configuration (~0UL versus ~0ULL). Make detection of the
resync-complete state more robust by comparing against array size.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
|
|
|
| |
The uuid is slightly fictitious but needed for array matching.
|
|
|
|
|
| |
'imsm' does not provide any real uuid, so we synthesise one
from various stable bits of the superblock.
|
|
|
|
|
|
|
|
| |
So:
mdadm -I /dev/whatever
will (if appropriate) add whatever to a container, then start
any arrays inside the container.
|
|
|
|
|
|
|
|
|
| |
mdadm -I /dev/part-of-container
should add that to a container, creating if it needed,
and then try to assemble any arrays in the container.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
| |
When we assemble an array, there are three different approaches
depending on whether metadata is internal or external, and on
kernel version.
Move all this to a common helper instead of duplicating in 3 places.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
| |
Now 'make everything' works again.
|
|
|
|
| |
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
|
|
|
|
|
|
|
| |
We cannot use the header of the 'best' device to find the
sections on the other devices!!
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we first start an array, it might be good to start recovery
straight away. That requires setting the array to 'dirty', but
only the metadata handler can know if that is required or not.
So have a third possible 'consistent' option to set_array_state.
Either 'no' or 'yes' or 'you choose'.
Return value indicates what was chosen.
'1' (no) should be chosen unless there is a good reason.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
| |
We forgot to convert endian for lba_offset at one point,
and use le32 instead of be32 right nearby!!
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
| |
That way it can be silent when we are just trying to figure out
which metadata to use, and noisy when detecting a real problem.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Support creating arrays inside an active ddf container by
sending a metadata update over a pipe to mdmon.
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Yes, we do want to free the buf, and the space too if it is still
there.
|
|
|
|
| |
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>
|
|
|
|
| |
Plus various bug fixes etc.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|