summaryrefslogtreecommitdiffstats
path: root/Grow.c
Commit message (Collapse)AuthorAgeFilesLines
* Replace sysarray with mdinfoNeil Brown2007-12-141-4/+4
| | | | | Sure, mdinfo is bigger, but having a uniform structure for lots of things will make life easier.
* Use 'mdinfo' instead of special 'sysdev' structure.Neil Brown2007-12-141-9/+12
| | | | | there is needless duplicatiion between mdinfo and sysdev, so discard the latter.
* Find super from fd on an array.Neil Brown2007-12-141-4/+4
| | | | | We used to use the major/minor numbers, but that isn't sufficient any more, so pass the fd, and possibly check 'text' version.
* Drop the superblock arg from all metadata methods.Neil Brown2007-12-141-34/+27
| | | | It is now in the 'supertype'
* Add 'supertype' arg to almost all metadata methods.Neil Brown2007-12-141-12/+14
| | | | The 'superblock' will be moved into this structure soon.
* Allow metadata handlers to free their own superblock.Neil Brown2007-12-141-4/+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-4/+4
|
* Fix restarting of a reshaping array.Neil Brown2007-10-161-0/+21
| | | | | | | | The last release broke the ability to assemble an array that was in the middle of a reshape. This patch adds code to test if the critical section needs to be restored or not so that - if we have failed to restore it, we know whether to fail or not.
* Report error when grow cannot be restarted.Neil Brown2007-08-201-3/+2
| | | | | | Make sure that if --assemble find an array in the critical region of a reshape, and cannot find the critical data to restart the reshape, it gives an error message.
* Improve error message for adding bitmap to a level that cannot support it.Neil Brown2007-05-211-0/+5
| | | | Also give error on --build if no devices given.
* Fix --grow --add for linear arrays.Neil Brown2007-05-211-8/+7
| | | | | | | | | | | | | 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.
* Central calls to ioctl BLKGETSIZENeil Brown2006-12-141-3/+1
| | | | Instead of opencoding the same thing everywhere.
* Increase raid456 stripe cache size if needed to --grow the array.Neil Brown2006-12-141-2/+18
| | | | | The setting used unfortunately requires intimate knowledge of the kernel, and it not reset when the reshape finishes.
* Improve allocation and use of space for bitmaps in version1 metadataNeil Brown2006-12-141-3/+5
| | | | | | | | | | 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.
* Stop map_dev from returning [0:0]Neil Brown2006-06-201-2/+2
| | | | | We sometimes need the NULL when major==minor==0. So make sure all callers of map_dev can cope with NULL.
* check return status of all write/fwrite functions as required by glibc 2.4Neil Brown2006-05-291-1/+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>
* Make sure homehost is set correctly when --update=uuidNeil Brown2006-05-231-3/+3
| | | | 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>
* Limit size of bitmap to 2million chunks.Neil Brown2006-05-151-2/+0
| | | | | | | | When creating a file bitmap, choose a default size that results in fewer than 2^21 chunks. Without this kmalloc failure in the kernel becomes likely. Signed-off-by: Neil Brown <neilb@suse.de>
* Fix problem with sector/KB size confuision for bitmap sizing.Neil Brown2006-05-151-1/+1
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Bug fixes to pass test suiteNeil Brown2006-03-291-9/+14
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Create missing /dev files where needed.Neil Brown2006-03-281-12/+12
| | | | | | | 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>
* Allow resize to backup to a file.Neil Brown2006-03-271-30/+58
| | | | | | | | | | To support resizing an array without a spare, mdadm now understands --backup-file= which should point to a file for storing a backup of critical data. This can be given to --grow which will create the file, or --assemble which will restore from the file if needed. Signed-off-by: Neil Brown <neilb@suse.de>
* Remove ident arg from getinfo_super;Neil Brown2006-03-271-4/+3
| | | | | | Add a 'name' field to 'info' to compensate. Signed-off-by: Neil Brown <neilb@suse.de>
* Put a 'canary' block in front of the backupNeil Brown2006-03-271-8/+29
| | | | | | .. so corruptio can be detected. Signed-off-by: Neil Brown <neilb@suse.de>
* Fix a few issues with the reshape patches.Neil Brown2006-03-201-7/+12
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Support restarting of a reshape on --assembleNeil Brown2006-03-201-8/+125
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Initial reshape supportNeil Brown2006-03-131-1/+407
| | | | | | Needs work for other levels etc. Signed-off-by: Neil Brown <neilb@suse.de>
* Stuff like..Neil Brown2006-01-301-5/+20
| | | | | | | | | - report Intent Bitmap in --detail - report internal bitmap in --examine - pass' --force through to --grow --bitmap - support v.large arrays in --grow --bitmap Signed-off-by: Neil Brown <neilb@suse.de>
* Work towards allowing larger internal bitmaps in version1 superblocks.Neil Brown2006-01-301-3/+8
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Support bitmaps with raid10Neil Brown2005-11-221-2/+9
| | | | | | 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/+12
| | | | | | | Version-3 bitmaps are host-endian. Version-4 are little-endian and so more portable. Signed-off-by: Neil Brown <neilb@suse.de>
* Passes all tests, nearly ready for release.Neil Brown2005-08-261-1/+1
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Support internal bitmaps with format-1 superblocks.Neil Brown2005-08-251-1/+1
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Assorted fixesNeil Brown2005-08-161-3/+71
| | | | | | | | | Support "--build"ing arrays with bitmaps. hot-removal of bitmaps --re-add of drives recently removed. assorted extra tests Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Add write-behind supportNeil Brown2005-08-091-2/+2
| | | | | | | | Currently this includes --write-behind to set level of write-behind supported --write-mostly to flag devices as write-mostly. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Make --zero-superblock work for version 1 superblocks.Neil Brown2005-06-071-2/+2
| | | | | | This requires passing the supertype to store_super Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Increase max-devs on type-1 superblocksNeil Brown2005-06-071-1/+1
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Support --grow --bitmap=internalNeil Brown2005-06-071-0/+83
| | | | | | | Adding a filebased bitmap is not yet supported, and this code is still under development. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* super1Neil Brown2005-05-031-9/+9
| | | | | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Fix raid5 creation with new code. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Add a 'super-switch' so that different format superblocks can be used.Neil Brown2005-05-031-6/+13
| | | | | | | | This includes: adding --metadata= option to choose metadata format adding metadata= word to config file. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Separate sueprblock handling into separate fileNeil Brown2005-05-031-39/+33
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Change MAJOR() etc to major() etcNeil Brown2005-04-041-6/+6
| | | | | | | | | This allows for larger device number if glibc supports it (requires 2.3.3). Also fail before creating larger device number if glibc support isn't present. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* mdadm-1.7.0mdadm-1.7.0Neil Brown2004-08-111-0/+192