| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current model for creating arrays involves writing
a superblock to each device in the array.
With containers (as with DDF), that model doesn't work.
Every device in the container may need to be updated
for an array made from just some the devices in a container.
So instead of calling write_init_super for each device,
we call it once for the array and have it iterate over
all the devices in the array.
To help with this, ->add_to_super now passes in an 'fd' and name for
the device. These get saved for use by write_init_super. So
add_to_super takes ownership of the fd, and write_init_super will
close it.
This information is stored in the new 'info' field of supertype.
As part of this, write_init_super now removes any old traces of raid
metadata rather than doing this in common code.
|
|
|
|
| |
These will be used for ddf.
|
|
|
|
|
|
|
| |
From: Kay Sievers <kay.sievers@vrfy.org>
Cc: David Zeuthen <david@fubar.dk>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
|
|
|
|
|
| |
When adding a device to an array, make sure we don't reserve
so much space for the bitmap that there isn't room for the data.
|
|
|
|
| |
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.
|
|
|
|
|
| |
Not all of the device may be available. Of that, not all may be used
(if devices are of different sizes).
|
| |
|
|
|
|
|
|
|
|
| |
Commit a40b4fe introduced a temporary supertype variable tst, instead of
manipulating st directly. However, it was forgotton to pass &tst into the
recursive load_super1 call, causing an infinite recursion.
Signed-off-by: martin f. krafft <madduck@debian.org>
|
|
|
|
|
|
|
|
| |
When load_super1 is trying to see which sub-version of v1 superblock
is present, failure will cause it to clear st->ss, which is not good.
So use a temporary 'super_type' for the 'test if this version works'
calls, then copy that into 'st' on success.
|
|
|
|
|
|
| |
When adding new disk to an array, don't reserve so much bitmap
space that the disk cannot store the required data. (Needed when
1.x array was created with older mdadm).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Doug Ledford <dledford@redhat.com>
OK, this one fixes an issue where people were doing manual array
creation and specifying superblock types other than 1.0 (aka, 1.1, 1.2)
and then using mdadm -Ebs to populate their mdadm.conf file. The
general problem is that if you specify a superblock type in the ARRAY
line (or on the command line), then you must specify the superblock type
*exactly*, including the minor version. Unfortunately, mdadm -Ebs
prints out all version 1 superblocks, regardless of minor version, as
just plain old 1. This breaks the mdadm.conf file for anything other
than plain version 1 superblock devices.
So, since I thought it was basically backwards that the mdadm -E output
was lax on specifying the location of the superblock where as the mdadm
-A input was strict, I reversed that. With this patch, the mdadm -E
output is now exact for any given superblock. But, in addition, the
mdadm -A input is now lax for any superblock that doesn't specifically
list the minor version, aka version 1 now means version 1, not version
0.90, but any minor version. So does default/large.
|
|
|
|
|
|
| |
Update the testing scripts to allow for new space calculations
for space for bitmaps.
Add a test script for adding devices to linear arrays.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new superblock needs to have a new disk.number. This is a bit of a hack...
Fix handling of negative bitmap offsets on 64bit hosts.
The bitmap offset is a signed 32bit number, so casting to (long)
isn't sufficient. We must cast to (int32_t).
Fix various problems with --grow --add for linear.
The code to add a drive to a live linear array had never
been tested properly and so was buggy. This tidies it up
and means that the new regression-test passes.
|
|
|
|
|
| |
The bitmap offset is a signed 32bit number, so casting to (long)
isn't sufficient. We must cast to (int32_t).
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
We have the same calculation in multiple places with subtle differences.
So unite it all.
Also fix up and endian problem in --examine.
|
| |
|
|
|
|
|
| |
The case that doesn't initialise it is impossible,
so just return with an error..
|
|
|
|
| |
Rather than opencoding the byteswap all the time.
|
| |
|
|
|
|
| |
Only happens on kernel with 32 bit sector_t.
|
|
|
|
| |
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...
|
|
|
|
|
| |
because it only shows how much of each device is actually used, not
how big they are.
|
|
|
|
| |
and is also degraded.
|
| |
|
|
|
|
| |
size.
|
|
|
|
|
|
|
|
|
|
| |
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...
|
|
|
|
|
|
| |
Previously it onl worked when one missing device.
Also split the "force" update_super method into two and it
is really serving two functions.
|
| |
|
| |
|
|
|
|
|
| |
It can be increased further, but that takes a bit more code
so will wait for 2.6.
|
|
|
|
|
| |
->name is sized to '33' to have room for a trailing nul,
but thhat needs to get put in position '32'. Doh!
|
|
|
|
| |
Thanks Martin Krafft
|
| |
|
|
|
|
|
|
|
|
|
| |
In 2.6.17 (and prior), the dev_number is ignored when a device
is added to an active array. Rather the first free number is used.
So we work around this by making sure we use the first free
number for dev_number.
Description...
|
|
|
|
| |
to make it a bit easier to see what is happening.
|
|
|
|
|
|
|
|
| |
While declaring variables in the middle of code withs with
newer gcc's it doesn't work with older, and it is arguably
less readable, so just do the right thing.
From: Paul Clements <paul.clements@steeleye.com>
|
|
|
|
|
|
| |
Bad/bad/bad, and cause compiler error on ppc (gcc 3.2.3).
From: Paul Clements <paul.clements@steeleye.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
| |
Instead of depending (too much) on what is in /dev,
we make names based on the content of the superblock.
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>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|