| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
From: Kay Sievers <kay.sievers@vrfy.org>
Cc: David Zeuthen <david@fubar.dk>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
|
| |
|
|
|
|
|
| |
Two places have code to find a free md device number. Make this
a subroutine.
|
| |
|
|
|
|
|
| |
Sure, mdinfo is bigger, but having a uniform structure for lots of things
will make life easier.
|
|
|
|
|
| |
there is needless duplicatiion between mdinfo and sysdev, so discard
the latter.
|
|
|
|
|
| |
We used to use the major/minor numbers, but that isn't sufficient
any more, so pass the fd, and possibly check 'text' version.
|
|
|
|
| |
It is now in the 'supertype'
|
|
|
|
|
| |
As this function takes 2 superblocks, the change is a bit more subtle,
so is done separately.
|
|
|
|
| |
The 'superblock' will be moved into this structure soon.
|
|
|
|
|
|
| |
As the metadata handler allocates the superblock, it should free it
too. DDF will have a more complex 'superblock' which needs more complex
freeing.
|
| |
|
|
|
|
|
|
|
|
| |
klibc still misses a lot functionality to let mdadm link against,
this small step helps to get to the real trouble.. :)
Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Doug Ledford <dledford@redhat.com>
This one fixes a bug where once manage mode is set, the -a short option
is no longer parsed correctly (true of grow mode as well). This happens
because when you switch the short opts to the bitmap_auto version, it
specifies that the argument must follow a, yet the loop expects to get
an undecorated option and parse it as the disk dev instead of trying to
parse optarg. So, create a new short opt array that is used for manage
and grow that doesn't list a as having an argument.
|
| |
|
|
|
|
| |
This is equivalent to raidautorun that some distros provide.
|
|
|
|
|
|
|
|
| |
udev likes to get information about a device as key=value pairs so it
can create disk/by-id links etc. So add --export flag which causes
the output of --detail to easily parsable.
From: Kay Sievers <kay.sievers@novell.com>
|
|
|
|
|
| |
As I cannot compile in on x86-64.
Also, small dietlibc fix
|
|
|
|
|
| |
--incremental allows arrays to be assembled one device at a time.
This is expected to be used with udev.
|
|
|
|
| |
Rather than opencoding the byteswap all the time.
|
| |
|
|
|
|
| |
Instead of opencoding the same thing everywhere.
|
|
|
|
| |
A number of odd bugs here, but now we have a regression test as well.
|
|
|
|
|
| |
This doesn't get mailed out, but will appear in syslog...
Maybe it should be mailed if it was a 'check' or 'repair' pass...
|
| |
|
|
|
|
|
| |
The setting used unfortunately requires intimate knowledge of the
kernel, and it not reset when the reshape finishes.
|
|
|
|
| |
and is also degraded.
|
|
|
|
|
|
|
|
|
|
| |
Depending on the size of the array we reserve space for up to 128K
of bitmap, and we use it where possible.
When hot-adding to a version 1.0 we can still only use the 3K at the
end though - need a sysfs interface to improve that.
If a small chunksize is requested on Create, we don't auto-enlarge
the reserved space - this still needs to be fixed.
|
|
|
|
|
| |
This stuff has never been used (at least as far as git history can
see). I wonder why it was there...
|
|
|
|
| |
They do nothing but cause confusion.
|
| |
|
|
|
|
|
| |
Never use /etc/mdadm.conf if --config file is given (previously
some code used one, some used the other).
|
|
|
|
|
|
|
| |
If not 'ftw' is available, still allow openning of devices by dev number.
More recent version of uclibc support nftw, so add support to check
for that.
|
|
|
|
|
|
|
| |
It seems byteswap.h isn't universally accepted, so
we do it by hand...
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
| |
CREATE metadata=1
in mdadm.conf will cause version-1 superblocks to be the default.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
| |
/usr/include/endian.h and /usr/include/byteswap.h together
can give us almost what we need...
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Luca Berra <bluca@vodka.it>
glibc 2.4 is pedantic on ignoring return values from fprintf, fwrite and
write, so now we check the rval and actually do something with it.
in the Grow.c case i only print a warning, since i don't think we can do
anything in case we fail invalidating those superblocks (is should never
happen, but then...)
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
| |
glibc says of rand
Do not use this function in applications intended to be
portable when good randomness is needed.
Go figure...
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
| |
pass CFLAGS to mdassemble build, enabling -Wall -Werror showed some
issues also fixed by the patch.
From: Luca Berra <bluca@vodka.it>
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
| |
This can be used to bootstrape homehost tagging.
If no arrays are found that are tagged, we look for any array
and tag it.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
| |
i.e. if assembling with --name or --super-minor, then if we find two
different arrays with the same apparent identity, and one was built
for 'this' host, then prefer that one instead of giving up in disgust.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
| |
We make sure all devices can are consistent before doing any --update
This saves us from updating some but not all of an array, and then
aborting.
It also means we can backtrack on out decisions, which we might want to
do later.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
| |
When an array is created, if the homehost is know,
the superblock gets it, either in the uuid, (via sha1)
or in the name field.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
So when you say auto=md or auto=part in mdadm.conf, it give a preference
for type of array, but standard name will override.
But --auto=md is more insistant.
FIXME I'm not at all happy about handling of names that already exist.
I don't think that should be removed if the device is active.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|