summaryrefslogtreecommitdiff
path: root/Grow.c
Commit message (Collapse)AuthorAge
* Merge branch 'master' of git://github.com/djbw/mdadm into devel-3.0NeilBrown2009-04-14
|\ | | | | | | | | | | | | | | | | Conflicts: Grow.c mdadm.h sysfs.c Due to independent fixes for the "mdadm hangs if reshape finishes too quickly" problem.
| * Grow: fix hang when reshape completes too fastDan Williams2009-04-12
| | | | | | | | | | | | | | | | | | | | | | For short reshapes the kernel may be done before mdadm can check that progress has passed the critical section. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | grow: don't wait forever for critical section to pass.NeilBrown2009-04-01
|/ | | | | | | | | | If an array reshape completed within 1 second, then --grow will not notice that it has finished and will keep waiting for the critical section to pass. So be more cautious in the test. Signed-off-by: NeilBrown <neilb@suse.de>
* Fix alignment for backup of reshape data.NeilBrown2008-08-19
| | | | | | | | Since we introduced O_DIRECT for device access we need properly aligned buffers and IO requests. The reshape code missed out on the conversion. Signed-off-by: NeilBrown <neilb@suse.de>
* Merge branch 'master' into from-stableNeilBrown2008-08-07
|\ | | | | | | | | | | | | Conflicts: Create.c Manage.c
| * Clean up usage of open()Doug Ledford2008-07-24
| | | | | | | | | | | | | | | | Fix on call that passed an invalid mode to open Don't pass a third arg unless we also pass O_CREAT Use symbolic args for 2nd and 3rd args Signed-off-by: Doug Ledford <dledford@redhat.com>
| * Add test for stoping and restarting a raid5 reshape.Neil Brown2008-06-27
| | | | | | | | | | There was a kernel bug with stopping and restarting raid5 recently. So add a test to check for it.
* | Use O_DIRECT for all IO to devices.Neil Brown2008-07-12
|/ | | | | | | | Using buffered IO risks non-atomic updates to parts of the device that we don't actually want to write to. This isn't in general safe. So switch to O_DIRECT for all that IO and make sure we have properly aligned buffers.
* Replace sysarray with mdinfoNeil Brown2007-12-14
| | | | | 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-14
| | | | | there is needless duplicatiion between mdinfo and sysdev, so discard the latter.
* Find super from fd on an array.Neil Brown2007-12-14
| | | | | 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-14
| | | | It is now in the 'supertype'
* Add 'supertype' arg to almost all metadata methods.Neil Brown2007-12-14
| | | | The 'superblock' will be moved into this structure soon.
* Allow metadata handlers to free their own superblock.Neil Brown2007-12-14
| | | | | | 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-14
|
* Fix restarting of a reshaping array.Neil Brown2007-10-16
| | | | | | | | 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-20
| | | | | | 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-21
| | | | Also give error on --build if no devices given.
* Fix --grow --add for linear arrays.Neil Brown2007-05-21
| | | | | | | | | | | | | 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-14
| | | | Instead of opencoding the same thing everywhere.
* Increase raid456 stripe cache size if needed to --grow the array.Neil Brown2006-12-14
| | | | | 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-14
| | | | | | | | | | 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-20
| | | | | 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-29
| | | | | | | | | | | | 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-23
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Just updaqte copyright dates and email addressNeil Brown2006-05-19
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Limit size of bitmap to 2million chunks.Neil Brown2006-05-15
| | | | | | | | 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-15
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Bug fixes to pass test suiteNeil Brown2006-03-29
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Create missing /dev files where needed.Neil Brown2006-03-28
| | | | | | | 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-27
| | | | | | | | | | 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-27
| | | | | | 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-27
| | | | | | .. so corruptio can be detected. Signed-off-by: Neil Brown <neilb@suse.de>
* Fix a few issues with the reshape patches.Neil Brown2006-03-20
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Support restarting of a reshape on --assembleNeil Brown2006-03-20
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Initial reshape supportNeil Brown2006-03-13
| | | | | | Needs work for other levels etc. Signed-off-by: Neil Brown <neilb@suse.de>
* Stuff like..Neil Brown2006-01-30
| | | | | | | | | - 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-30
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Support bitmaps with raid10Neil Brown2005-11-22
| | | | | | 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-11
| | | | | | | 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-26
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Support internal bitmaps with format-1 superblocks.Neil Brown2005-08-25
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Assorted fixesNeil Brown2005-08-16
| | | | | | | | | 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-09
| | | | | | | | 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-07
| | | | | | 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-07
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Support --grow --bitmap=internalNeil Brown2005-06-07
| | | | | | | 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-03
| | | | | | | 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-03
| | | | | | | | 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-03
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>