summaryrefslogtreecommitdiff
path: root/Examine.c
Commit message (Collapse)AuthorAge
* Release mdadm-3.3NeilBrown2013-09-03
| | | | | | (and various cosmetic fixes) Signed-off-by: NeilBrown <neilb@suse.de>
* MISC: Add --examine-badblocks optionNeilBrown2012-12-05
| | | | | | This will list the contents of the bad-blocks log, if one is present. Signed-off-by: NeilBrown <neilb@suse.de>
* Minor cosmetic fixes in various files.NeilBrown2012-08-13
| | | | Signed-off-by: NeilBrown <neilb@suse.de>
* change Examine to take a struct contextNeilBrown2012-07-09
| | | | Signed-off-by: NeilBrown <neilb@suse.de>
* Examine: split 'verbose' out from 'brief'.NeilBrown2012-07-09
| | | | | | | | | | The value of 'verbose' is sometimes mixed into 'brief', particularly for Examine. This is messy and confusing. So keep them separate. 'brief' still gets assumed when 'scan' is set, unless we are very verbose. Signed-off-by: NeilBrown <neilb@suse.de>
* Remove scattered checks for malloc success.NeilBrown2012-07-09
| | | | | | | | | | | | | | malloc should never fail, and if it does it is unlikely that anything else useful can be done. Best approach is to abort and let some super-daemon restart. So define xmalloc, xcalloc, xrealloc, xstrdup which don't fail but just print a message and exit. Then use those removing all the tests for failure. Also replace all "malloc;memset" sequences with 'xcalloc'. Signed-off-by: NeilBrown <neilb@suse.de>
* Introduce pr_err for printing error messages.NeilBrown2012-07-09
| | | | | | | 'pr_err("' is a lot shorter than 'fprintf(stderr, Name ": ' cont_err() is also available. Signed-off-by: NeilBrown <neilb@suse.de>
* examine: allows to examine a disk metadata on non-metadata compliant systemsLabun, Marcin2011-03-23
| | | | | | | | | | | | | Allow for loading metadata from disk attached to non-metadata compliant system. Affects mdadm --examine and guess_super. Added ignore_hw_compat in supertype to pass information to load_super handler. If ignore_hw_compat is set the handler should load metadata also from disks that do not comply with metadata requirements (i.e. disk is not attached to native controller, etc). Signed-off-by: Marcin Labun <marcin.labun@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Don't close fds in write_init_superNeilBrown2011-01-25
| | | | | | | | | | | | | | | We previously closed all 'fds' associated with an array in write_init_super .. sometimes, and sometimes at bad times. This isn't neat and free_super is a better place to close them. So make sure free_super always closes the fds that the metadata manager kept hold of, and stop closing them in write_init_super. Also add a few more calls to free_super to make sure they really do get closed. Reported-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Add must_be_container helper.NeilBrown2010-11-22
| | | | | | | This checks a block device to see if it could be a container, and in particular cannot be a member device. Signed-off-by: NeilBrown <neilb@suse.de>
* Improve type names for mddev_devNeilBrown2010-11-22
| | | | | | | | | Remove the _t pointer typedef and remove the _s suffix for the structure, These things do not help readability. Signed-off-by: NeilBrown <neilb@suse.de>
* Use new load_container in ExamineNeilBrown2010-11-22
| | | | | | | This makes explicit the two different ways to use Examine And removes a user of container_loaded. Signed-off-by: NeilBrown <neilb@suse.de>
* get_info_super: report which other devices are thought to be working/failed.NeilBrown2010-11-22
| | | | | | | | | | | | | | To accurately detect when an array has been split and is now being recombined, we need to track which other devices each thinks is working. We should never include a device in an array if it thinks that the primary device has failed. This patch just allows get_info_super to return a list of devices and whether they are thought to be working or not. Signed-off-by: NeilBrown <neilb@suse.de>
* Add mbr pseudo metadata handler.NeilBrown2010-09-06
| | | | | | | | | | | | To support incorpating a new bare device into a collection of arrays - one partition each - mdadm needs a modest understanding of partition tables. The main needs to be able to recognise a partition table on one device and copy it onto another. This will be done using pseudo metadata types 'mbr' and 'gpt'. Signed-off-by: NeilBrown <neilb@suse.de>
* Examine: don't count containers as sparesDan Williams2009-09-15
| | | | | | | | | | mdadm -Ebs will include containers in the scanned device list. Examine() falsely thinks they are spares when MD_DISK_SYNC is not set. This could be fixed by forcing all formats to set this flag for container devices, but this flag is currently used by imsm to identify free-floating spares. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* Examine: fixup output in the presence of containers with sparesDan Williams2009-09-15
| | | | | | | If we dump any 'spare' or 'device' information for a container in the 'brief' case then we need a newline before printing member array info. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* Exmaine/brief: put member arrays after container arrays.NeilBrown2009-08-07
| | | | | | | | | A previous patch moved move the '--examine --brief' reporting of member arrays to before their containers. This breaks "mdadm -As" assembly. So put them back, but still fix the problem addressed by previous patch. Signed-off-by: NeilBrown <neilb@suse.de>
* Merge branch 'master' of git://github.com/djbw/mdadmNeilBrown2009-08-07
|\
| * fix examine_brief segfaultDan Williams2009-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When performing an "-Ebs -e <metadata type>" we segfault because the superblock has been freed too early. We also leak memory for 'ddf' and 'imsm' because, unlike super[01], we do not implicitly free when ->load_super is called on an already loaded supertype. So, fix up imsm and ddf to match type 0 and 1 ->load_super() semantics, and update Examine to not free the superblock until all usages have been exhausted. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Examine: make --metadata= work with --briefNeilBrown2009-07-10
|/ | | | | | They had different assumptions about the lifetime of 'st'. Signed-off-by: NeilBrown <neilb@suse.de>
* Update copyright dates and remove references to @cse.unsw.edu.auNeilBrown2009-06-02
| | | | | | Also removed 'paper' addresses. Signed-off-by: NeilBrown <neilb@suse.de>
* Make --brief even briefer.NeilBrown2009-05-11
| | | | | | | | | | | | | Because ---examine --brief, or --detail --brief are often used to create mdadm.conf, and because people don't want to have to update their mdadm.conf unnecessarily, we don't want to include information that might change. And now that level changing is supported, that is almost everything but UUID. So move some more fields into the "Only print with --verbose" class. Signed-off-by: NeilBrown <neilb@suse.de>
* Examine: add examine_export for ddf and avoid crashes.NeilBrown2009-03-09
| | | | | | If the personality doesn't provide export_examine_super, don't crash. Signed-off-by: NeilBrown <neilb@suse.de>
* Examine: fix MD_DISK_SYNC is a bit not a flagDan Williams2008-10-28
| | | | | | | Examine() is actually looking at the ACTIVE bit. This happened to work for imsm spares but now it needs to be fixed up. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* add --export option to --examineKay Sievers2008-05-06
| | | | | | | From: Kay Sievers <kay.sievers@vrfy.org> Cc: David Zeuthen <david@fubar.dk> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
* Drop the superblock arg from all metadata methods.Neil Brown2007-12-14
| | | | It is now in the 'supertype'
* Fix compare_super to take supertype instead of a superblock.Neil Brown2007-12-14
| | | | | 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-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 error code from examine properly..Neil Brown2006-06-02
| | | | | | The last one was wrong :-( 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>
* Include homehost information in --examine as appropriateNeil Brown2006-05-19
| | | | 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>
* Fix incorrect error status from --examine --scanNeil Brown2006-05-19
| | | | 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>
* Provide error message if --examine does find a valid superblockNeil Brown2006-01-27
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Allow scanning of devices listed in /proc/partitions independant of /devNeil Brown2005-12-05
| | | | | | | If a device found in /proc/partitions isn't listed in /dev, then mknod a temporary name and open that. Signed-off-by: Neil Brown <neilb@suse.de>
* Remvoe blank line from '--examine --brief' output.Neil Brown2005-11-22
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Add 'quite' option and tidy up some tests.Neil Brown2005-08-15
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Support nameing of version-1 arrays.Neil Brown2005-08-09
| | | | | | | --name is recognised in --create and --assemble name= is recognised in config file. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Don't list device= in --examine --scan output.Neil Brown2005-06-14
| | | | | | | As the device list isn't stable, recording it should be avoided. The device= list is still available if --verbose is given (once). 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>
* Change "dirty" to "active" in array statusNeil Brown2005-04-04
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* mdadm-1.8.0Neil Brown2004-11-01
|
* mdadm-1.7.0Neil Brown2004-08-11
|
* mdadm-1.6.0Neil Brown2004-06-04
|
* mdadm-1.5.0Neil Brown2004-01-22
|