summaryrefslogtreecommitdiffstats
path: root/Kill.c
Commit message (Collapse)AuthorAgeFilesLines
* Kill: fix when zeroing busy devices.Artur Wojcik2010-01-291-2/+5
| | | | | | | | | mdadm should not wait indefinitely when it trys to reset superblock on device which is busy (cannot be opened). Acked-by: Andre Noll <maan@systemlinux.org> Signed-off-by: Artur Wojcik <artur.wojcik@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Various fixes for --killNeilBrown2009-11-241-5/+5
| | | | | | | | | - When --kill-superblock is used with --metadata, find every different superblock if there are several and kill them all. - When creating a new array, kill off any old metadata. The code to do this was already present but has become broken over time. Signed-off-by: NeilBrown <neilb@suse.de>
* Update copyright dates and remove references to @cse.unsw.edu.auNeilBrown2009-06-021-7/+2
| | | | | | Also removed 'paper' addresses. Signed-off-by: NeilBrown <neilb@suse.de>
* Merge branch 'master' into devel-3.0NeilBrown2008-12-181-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Assemble.c Incremental.c Kill.c ReadMe.c inventory mapfile.c mdadm.8 mdadm.spec mdassemble.8
| * Kill: Don't use O_EXCL when --force is used.NeilBrown2008-12-181-1/+1
| | | | | | | | | | | | | | We really want --zero-super --force to zero the superblock in all situations. So don't open with O_EXCL - trust the user. Signed-off-by: NeilBrown <neilb@suse.de>
* | Use O_DIRECT for all IO to devices.Neil Brown2008-07-121-1/+1
| | | | | | | | | | | | | | | | 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.
* | Remove silly convention that major='-1' means 'zero superblock'.Neil Brown2008-07-121-3/+1
| | | | | | | | Use 'info pointer is NULL' instead.
* | Change write_init_super to be called only once.Neil Brown2008-05-151-2/+2
|/ | | | | | | | | | | | | | | | | | | | | 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.
* Drop the superblock arg from all metadata methods.Neil Brown2007-12-141-5/+4
| | | | It is now in the 'supertype'
* Add 'supertype' arg to almost all metadata methods.Neil Brown2007-12-141-1/+1
| | | | The 'superblock' will be moved into this structure soon.
* Allow metadata handlers to free their own superblock.Neil Brown2007-12-141-1/+1
| | | | | | 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-1/+1
|
* Support --uuid= with --create to choose your own UUID.Neil Brown2006-12-141-1/+1
|
* Make homehost information appear in superblock.Neil Brown2006-05-191-1/+1
| | | | | | | | 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>
* Bug fixes to pass test suiteNeil Brown2006-03-291-0/+2
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Kill old superblocks on create.Neil Brown2006-03-281-7/+11
| | | | | | | Make sure old-version superblocks are not around to confuse anything when a new array is created. Signed-off-by: Neil Brown <neilb@suse.de>
* Enable support for v.large raid1.Neil Brown2006-01-271-1/+1
| | | | | | | 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>
* Support nameing of version-1 arrays.Neil Brown2005-08-091-1/+1
| | | | | | | --name is recognised in --create and --assemble name= is recognised in config file. 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>
* super1Neil Brown2005-05-031-6/+6
| | | | | | | 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-4/+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-22/+8
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Use O_EXCL when opening component devices to be assembled into an arrayNeil Brown2005-04-041-1/+1
| | | | | | | In 2.6, this will fail if the device is already in use, so we can detect this error more easily. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* mdadm-0.7mdadm-0.7Neil Brown2002-03-081-0/+83