summaryrefslogtreecommitdiffstats
path: root/super0.c
Commit message (Collapse)AuthorAgeFilesLines
* Print 'Events' more sensibly.Neil Brown2008-04-281-1/+3
| | | | Instead of MSW.LSW, just print it as a 64bit number.
* Drop the superblock arg from all metadata methods.Neil Brown2007-12-141-45/+49
| | | | It is now in the 'supertype'
* Fix compare_super to take supertype instead of a superblock.Neil Brown2007-12-141-5/+8
| | | | | As this function takes 2 superblocks, the change is a bit more subtle, so is done separately.
* Add 'supertype' arg to almost all metadata methods.Neil Brown2007-12-141-17/+18
| | | | The 'superblock' will be moved into this structure soon.
* Allow metadata handlers to free their own superblock.Neil Brown2007-12-141-0/+7
| | | | | | As the metadata handler allocates the superblock, it should free it too. DDF will have a more complex 'superblock' which needs more complex freeing.
* Remove spaces/tabs from ends of lines.Neil Brown2007-12-141-7/+7
|
* Fix error message when adding a device that is too small.Neil Brown2007-08-201-6/+6
| | | | | We were multiplying MD_RESERVED_SECTORS by 1024 instead of 512, so lots of 'is it too small' checks were wrong.
* Fix --grow --add for linear arrays.Neil Brown2007-05-211-3/+10
| | | | | | | | | | | | | 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.
* Add --export option to --detail to use key=value pairs.Kay Sievers2007-05-081-0/+13
| | | | | | | | 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>
* Release 2.6mdadm-2.6Neil Brown2006-12-211-3/+3
|
* Add new mode: --incrementalNeil Brown2006-12-211-0/+3
| | | | | --incremental allows arrays to be assembled one device at a time. This is expected to be used with udev.
* Support --uuid= with --create to choose your own UUID.Neil Brown2006-12-141-11/+18
|
* Central calls to ioctl BLKGETSIZENeil Brown2006-12-141-46/+14
| | | | Instead of opencoding the same thing everywhere.
* Change 'Device Size' to 'Used Dev Size'Neil Brown2006-12-141-1/+2
| | | | | because it only shows how much of each device is actually used, not how big they are.
* Give useful message if raid4/5/6 cannot be started because it is not clean ↵Neil Brown2006-12-141-0/+1
| | | | and is also degraded.
* Improve allocation and use of space for bitmaps in version1 metadataNeil Brown2006-12-141-2/+6
| | | | | | | | | | 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.
* Remove some unused interfaces to the metadata handlers.Neil Brown2006-12-141-17/+0
| | | | | This stuff has never been used (at least as far as git history can see). I wonder why it was there...
* Make Assemble/Force work on raid6 with 2 missing devices.Neil Brown2006-12-141-1/+9
| | | | | | Previously it onl worked when one missing device. Also split the "force" update_super method into two and it is really serving two functions.
* Make --examine report chunk size when it shouldNeil Brown2006-10-091-0/+2
| | | | Currently it doesn't for raid6 and raid10
* Remove indeterminism from names in --examine --brief output.Neil Brown2006-08-111-5/+0
| | | | | | | | | | | | 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
* Fix a recently introduced bug, and make --assemble more resilient to it.Neil Brown2006-06-261-1/+1
| | | | | | | 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)
* Remove libssl dependancy and always use sha1.c codeNeil Brown2006-06-021-20/+22
| | | | | | | | 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>
* check return status of all write/fwrite functions as required by glibc 2.4Neil Brown2006-05-291-1/+2
| | | | | | | | | | | | 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>
* Make sure everything compiles...Neil Brown2006-05-261-0/+4
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Improve names reported by --examine --briefNeil Brown2006-05-261-3/+9
| | | | | | | 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>
* Choose better devnumbers and tidy up some issues with finding names.Neil Brown2006-05-261-1/+3
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Allow autoassembly to choose it's own name for the array.Neil Brown2006-05-231-1/+1
| | | | | | | | | This cannot be used yet, but it is working towards auto-assembly. When auto-assembling an array, we make a name in /dev/md/ giving a number (from the peferred minor) or name (from set-name). Signed-off-by: Neil Brown <neilb@suse.de>
* When assembly arrays using incomplete detail, prefer arrays built for this host.Neil Brown2006-05-231-0/+12
| | | | | | | | 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>
* Support --update=homehost to allow updating of homehost information.Neil Brown2006-05-231-0/+7
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Make sure homehost is set correctly when --update=uuidNeil Brown2006-05-231-1/+9
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Include homehost information in --examine as appropriateNeil Brown2006-05-191-4/+12
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Include homehost information in --detail where appropriate.Neil Brown2006-05-191-1/+8
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Make homehost information appear in superblock.Neil Brown2006-05-191-2/+17
| | | | | | | | 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>
* Just updaqte copyright dates and email addressNeil Brown2006-05-191-1/+1
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* When updating uuid, update the bitmap as well - internal bitmaps.Neil Brown2006-05-161-2/+36
| | | | | | | Otherwise when you "--update==uuid" an array with an internal bitmap, it will break, badly. Signed-off-by: Neil Brown <neilb@suse.de>
* Fix problem with sector/KB size confuision for bitmap sizing.Neil Brown2006-05-151-4/+2
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Support new offset layout for raid10Neil Brown2006-05-151-4/+8
| | | | | | Requires 2.6.18. Signed-off-by: Neil Brown <neilb@suse.de>
* [PATCH] Make sure update_super returns correct value.Neil Brown2006-04-281-4/+14
| | | | | | | | | | | | | | | | For 'force' and 'assemble', update_super must return true if anything was changed. Also fix a bug with wonly handling in super0. Signed-off-by: Neil Brown <neilb@suse.de> ### Diffstat output ./super0.c | 18 ++++++++++++++---- ./super1.c | 7 +++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff ./super0.c~current~ ./super0.c
* Create missing /dev files where needed.Neil Brown2006-03-281-1/+1
| | | | | | | Whenever we need a device file to open, if one cannot be found in /dev, create a temporary one. Signed-off-by: Neil Brown <neilb@suse.de>
* Remove ident arg from getinfo_super;Neil Brown2006-03-271-2/+2
| | | | | | Add a 'name' field to 'info' to compensate. Signed-off-by: Neil Brown <neilb@suse.de>
* Support restarting of a reshape on --assembleNeil Brown2006-03-201-10/+26
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Release some compile fixes.Neil Brown2006-02-061-3/+4
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Have --examine report reshape details.Neil Brown2006-01-271-1/+40
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Enable support for v.large raid1.Neil Brown2006-01-271-2/+4
| | | | | | | clean up 'long long' usage for size of array, so that with v-1 superblocks a raid1 larger than 2TB is possible. Signed-off-by: Neil Brown <neilb@suse.de>
* Minor fixesNeil Brown2006-01-271-1/+1
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Support updating of uuid during --assemble.Neil Brown2005-12-051-0/+6
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Support bitmaps with raid10Neil Brown2005-11-221-4/+3
| | | | | | And a couple of other little things Signed-off-by: Neil Brown <neilb@suse.de>
* Create version-4 bitmaps if kernel supports it.Neil Brown2005-10-111-2/+2
| | | | | | | Version-3 bitmaps are host-endian. Version-4 are little-endian and so more portable. Signed-off-by: Neil Brown <neilb@suse.de>
* Fix remaining problems with hot-add bitmap to version-1 superblockNeil Brown2005-09-121-1/+1
| | | | | | Also some more tests - r5 and r6 bitmaps Signed-off-by: Neil Brown <neilb@suse.de>
* Fix assembling of raid10 in the face of missing devices.Neil Brown2005-09-121-0/+5
| | | | | | | We now check if enough devices are present properly, so --force can be used to good effect. Signed-off-by: Neil Brown <neilb@suse.de>