Commit Graph

3788 Commits

Author SHA1 Message Date
Neil Brown 83205b6419 Fix some endian-ness issues with v1 superblocks. 2006-10-09 11:17:12 +10:00
Neil Brown 2c102711fd Make --examine report chunk size when it should
Currently it doesn't for raid6 and raid10
2006-10-09 11:16:56 +10:00
Neil Brown 8f21823f39 Minor man page and comment fixes
Thanks To: "Scott Weikart" <Scott.W@Benetech.org>
2006-10-09 11:16:33 +10:00
Neil Brown 38098016ca Allow symlink creation to be disabled from command line or mdadm.conf 2006-08-11 18:00:05 +10:00
Neil Brown 0a6e1c6743 Create symlinks from /dev into /dev/md
When (auto)creating devices in /dev/md/, create
an appropriate symlink from /dev to avoid confusion.
2006-08-11 18:00:00 +10:00
Neil Brown d1e80164a2 Minor improvement in name auto-chosen for version-1 superblocks.
/dev/md_d0  should have name 'd0' by default to
make /dev/md/d0.
2006-08-11 17:59:57 +10:00
Neil Brown c56d3db4d3 Remove indeterminism from names in --examine --brief output.
It is much better for this sort of thing to be predictable
rather than depending on what devices exist, especially as
these days entries in /dev/ often don't pre-exist.
So make it always
   /dev/mdX

for version0 superblocks.

Version1 are always /dev/md/NAME
2006-08-11 17:59:53 +10:00
Neil Brown 3b936f2c2e Release 2.5.3 2006-08-07 12:00:30 +10:00
Neil Brown 60248f7433 Tidyup automatic name choice for v-1 arrays
/dev/md_d0 now becomes '0', not '_d0'.
2006-08-07 11:30:02 +10:00
Neil Brown 43f2372a03 Fix starting of degraded arrays.
Recent change broke assembling of degraded arrays, making
it require --run.  This fixes that.
2006-08-07 11:13:01 +10:00
Neil Brown 90fc992e4e Explicitly state GPL license in man pages. 2006-08-07 11:12:25 +10:00
Neil Brown 2a940e3619 Document usage of version0.91 superblock. 2006-08-07 11:11:42 +10:00
Neil Brown 2a91e1491e Release 2.5.2
Description...
2006-06-27 21:31:58 +10:00
Neil Brown 8aec876d2e More consistent honoring of --configfile
Never use /etc/mdadm.conf if --config file is given (previously
some code used one, some used the other).
2006-06-26 15:11:01 +10:00
Neil Brown 8bd2e0c339 Fix user-after-free bug in error path in --monitor mode. 2006-06-26 15:10:55 +10:00
Neil Brown 45e878bba6 Improve ftw handling.
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.
2006-06-26 15:10:48 +10:00
Neil Brown 08110d41bc Fix a recently introduced bug, and make --assemble more resilient to it.
Make -assemble a bit more resilient to finding strange
 information in superblocks.
Don't claim newly added spares are InSync!! (don't know why that
 code was ever in there)
2006-06-26 12:26:12 +10:00
Neil Brown 7eae7080e2 Work around bug in --add handling for version-1 superblocks
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...
2006-06-26 12:26:09 +10:00
Neil Brown c3684618b7 Add 'Array Slot' line to --examine for version-1 superblocks
to make it a bit easier to see what is happening.
2006-06-26 12:26:01 +10:00
martin f krafft 38dbfd8a8f Fix manpage typo
From: martin f krafft <madduck@madduck.net>
2006-06-26 12:07:12 +10:00
Neil Brown ae184b4927 Get the changelog uptodate for recent changes. 2006-06-26 12:06:01 +10:00
Paul Clements b015e6c268 Move a variable declaration to the declaration area.
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>
2006-06-20 10:01:47 +10:00
Neil Brown e81cdd9f37 Stop map_dev from returning [0:0]
We sometimes need the NULL when major==minor==0.
So make sure all callers of map_dev can cope with NULL.
2006-06-20 10:01:43 +10:00
Paul Clements 722966c66d Fix problem with post-increment usage in macro
Bad/bad/bad, and cause compiler error on ppc (gcc 3.2.3).

From: Paul Clements <paul.clements@steeleye.com>
2006-06-20 10:01:23 +10:00
Neil Brown beca3d00d9 Release 2.5.1 2006-06-16 10:54:14 +10:00
Neil Brown 82d8a04691 Update Changelog for 2.5.1 2006-06-16 10:53:55 +10:00
Neil Brown 067db4dfcd Fix offsetof macro for 64bit hosts 2006-06-16 10:53:50 +10:00
Neil Brown eed35d6661 Fix memory leak in monitor mode
When rescanning /dev, we didn't free the old list.
Also don't search for device with a number of 0,0

Signed-off-by: Neil Brown <neilb@suse.de>
2006-06-16 10:26:12 +10:00
Neil Brown 02761a7c44 Fix up some internalbitmap tests 2006-06-16 10:21:11 +10:00
martin f. krafft 4e9b583928 Allow CONFFILE2 to be overridden during make invocation. 2006-06-02 20:53:02 +10:00
martin f krafft 77e521ce74 CPPFLAGS gets used automatically on implicit rules.
Take it out for cosmetic reasons to prevent duplicate -DDEBIAN.

Signed-off-by: Neil Brown <neilb@suse.de>
2006-06-02 20:47:29 +10:00
Neil Brown 6a255b69be Avoid misdetection of overlapping partitions...
As version-0.90 superblock don't record the superblock
offset, it is possible for overlapping partitions,
or a partition that starts on a 64K boundary in the whole device
to result in mis-detection - one partition or device might
be detected where the other was intended.

To avoid this awkward possibility, we reject assembly attempts
which seem to have two devices that are different but have the
same version-0.90 superblock.

To avoid this problem altogether, switch to version-1 metadata.

Signed-off-by: Neil Brown <neilb@suse.de>
2006-06-02 06:58:39 +00:00
Neil Brown 8268ed7403 Remove libssl dependancy and always use sha1.c code
Apparently there are license issues with openssl, so
just use sha1.c always.   This means we can get rid of
SHA1.c

Signed-off-by: Neil Brown <neilb@suse.de>
2006-06-02 06:12:19 +00:00
Neil Brown ab56093f3b Get --stop to honour --quiet
And as a side effect, if --quiet isn't given, stopped devices are
reported.

Signed-off-by: Neil Brown <neilb@suse.de>
2006-06-02 05:53:22 +00:00
Neil Brown 0ae03b8ad8 Yet another include file that someone doesn't like....
It seems byteswap.h isn't universally accepted, so
we do it by hand...

Signed-off-by: Neil Brown <neilb@suse.de>
2006-06-02 05:37:47 +00:00
Neil Brown 058574b1da Allow default metadata to be specified in mdadm.conf
CREATE metadata=1
in mdadm.conf will cause version-1 superblocks to be the default.

Signed-off-by: Neil Brown <neilb@suse.de>
2006-06-02 05:33:40 +00:00
Neil Brown 1d1e104b0d Don't try to create a new device when using --manage or --grow
... as that's just silly!

Signed-off-by: Neil Brown <neilb@suse.de>
2006-06-02 01:53:13 +00:00
Neil Brown efd441d17b Finally (I hope) get byteorder stuff portable.
/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>
2006-06-02 01:49:00 +00:00
Neil Brown a524a7ee7e Fix typo in mail message from --monitor
From: martin f krafft <madduck@madduck.net>

Signed-off-by: Neil Brown <neilb@suse.de>
2006-06-02 01:34:30 +00:00
Neil Brown e52f8e251a Fix error code from examine properly..
The last one was wrong :-(

Signed-off-by: Neil Brown <neilb@suse.de>
2006-06-02 01:32:45 +00:00
Neil Brown c97be4db86 Improve compiling for static binaries.
Have "#ifdef STATIC" in config.c, and the 'rmconf' target
was a mess.
Instead, create 'pwgr.c' with stub routines for those unavailable
when statically compiled, and include that in STATICOBJ

Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-29 04:09:21 +00:00
Neil Brown 0c239ef733 Make add_dev for uclibc return something.
As it is now 'int', it needs to.

Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-29 04:02:15 +00:00
Neil Brown 3bb59d4044 Add uninstall target to Makefile
From: "Dirk Jagdmann" <jagdmann@gmail.com>

Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-29 02:18:22 +00:00
Neil Brown ff7754ede3 New install-* targets for installing differently compiled mdadms
e.g. install-static to install the statically compiled version, etc.

From: "Dirk Jagdmann" <jagdmann@gmail.com>
Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-29 02:18:22 +00:00
Neil Brown 1377730fc4 Makefile improvements for static linking.
From: "Dirk Jagdmann" <jagdmann@gmail.com>
Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-29 02:18:22 +00:00
Neil Brown 9fca7d6236 check return status of all write/fwrite functions as required by glibc 2.4
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>
2006-05-29 02:06:32 +00:00
Neil Brown 280a927d3d Uclibc has deprecated 'random' so use 'rand' instead.
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>
2006-05-29 02:06:32 +00:00
Neil Brown b56c363090 add CFLAGS to mdassemble build and fix a couple of non-returning functions
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>
2006-05-29 02:06:32 +00:00
Neil Brown b1ec2d6a74 This is to avoid gcc warnings when building with strict-aliasing optimization
fix for another srict-aliasing problem, you can typecast a reference to a
void pointer to anything, you cannot typecast a reference to a
struct.

From: Luca Berra <bluca@vodka.it>
Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-29 02:06:32 +00:00
Neil Brown 382245c31f snprintf size should be at most the size of the buffer
From: Luca Berra <bluca@vodka.it>
Signed-off-by: Neil Brown <neilb@suse.de>
2006-05-29 02:06:32 +00:00