summaryrefslogtreecommitdiffstats
path: root/util.c
Commit message (Collapse)AuthorAgeFilesLines
* Compiple fixes for mdassemble and diet-libcNeil Brown2008-05-151-39/+41
|
* Fix support for --update=swapsuperNeil Brown2008-05-151-1/+2
| | | | The user of dup_super broke it.
* Fix possible NULL dereference in super_by_fdNeil Brown2008-05-151-1/+2
|
* let '-a' be specified for Incremental modeDan Williams2008-05-051-2/+5
| | | | | | From: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* Unify code into find_free_devnum.Neil Brown2008-05-051-0/+37
| | | | | Two places have code to find a free md device number. Make this a subroutine.
* fix load_super/free_super mismatch in util.cDan Williams2008-05-051-1/+1
| | | | | | From: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* diff -ru mdadm-2.6.4-orig/Query.c mdadm-2.6.4/Query.cNeil Brown2008-04-291-0/+5
|
* Use sysfs info for metadata version info in Detail and elsewhere.Neil Brown2007-12-141-1/+3
|
* Replace sysarray with mdinfoNeil Brown2007-12-141-3/+3
| | | | | Sure, mdinfo is bigger, but having a uniform structure for lots of things will make life easier.
* Find super from fd on an array.Neil Brown2007-12-141-11/+45
| | | | | 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-11/+16
| | | | It is now in the 'supertype'
* Add 'supertype' arg to almost all metadata methods.Neil Brown2007-12-141-3/+3
| | | | 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-33/+30
|
* Remove bogus add_dev definition.Neil Brown2007-05-081-4/+0
| | | | | If nether ftw nor nftw are available, add_dev gets defined twice. Fix that...
* Add new mode: --incrementalNeil Brown2006-12-211-0/+8
| | | | | --incremental allows arrays to be assembled one device at a time. This is expected to be used with udev.
* Centralise code for copying uuidNeil Brown2006-12-141-0/+19
| | | | Rather than opencoding the byteswap all the time.
* Central calls to ioctl BLKGETSIZENeil Brown2006-12-141-0/+22
| | | | Instead of opencoding the same thing everywhere.
* Give useful message if raid4/5/6 cannot be started because it is not clean ↵Neil Brown2006-12-141-3/+9
| | | | and is also degraded.
* Fix bugs related to raid10 and the new offset layout.Neil Brown2006-10-191-1/+1
| | | | | Need to mask of bits above the bottom 16 when calculating number of copies.
* Mdassemble improvementsLuca Berra2006-10-161-0/+6
| | | | | | | | | From: Luca Berra <bluca@comedia.it> - Fix a bug where mdassemble didn't close a filedescriptor and so couldn't assembele stacked arrays. - Allow mdassemble, when run a second time, to mark all arrays as writable. This is useful if they are started read-only as is best at boot-time.
* Don't #include blkpg.hNeil Brown2006-10-161-1/+33
| | | | Just include the content directly. It is safer.
* Remove partitions from components of an md arrayNeil Brown2006-10-131-0/+20
| | | | They do nothing but cause confusion.
* Improve ftw handling.Neil Brown2006-06-261-28/+22
| | | | | | | If not 'ftw' is available, still allow openning of devices by dev number. More recent version of uclibc support nftw, so add support to check for that.
* Stop map_dev from returning [0:0]Neil Brown2006-06-201-6/+7
| | | | | We sometimes need the NULL when major==minor==0. So make sure all callers of map_dev can cope with NULL.
* Fix memory leak in monitor modeNeil Brown2006-06-161-0/+13
| | | | | | | When rescanning /dev, we didn't free the old list. Also don't search for device with a number of 0,0 Signed-off-by: Neil Brown <neilb@suse.de>
* Make add_dev for uclibc return something.Neil Brown2006-05-291-0/+1
| | | | | | As it is now 'int', it needs to. Signed-off-by: Neil Brown <neilb@suse.de>
* add CFLAGS to mdassemble build and fix a couple of non-returning functionsNeil Brown2006-05-291-1/+1
| | | | | | | | pass CFLAGS to mdassemble build, enabling -Wall -Werror showed some issues also fixed by the patch. From: Luca Berra <bluca@vodka.it> Signed-off-by: Neil Brown <neilb@suse.de>
* snprintf size should be at most the size of the bufferNeil Brown2006-05-291-1/+1
| | | | | From: Luca Berra <bluca@vodka.it> Signed-off-by: Neil Brown <neilb@suse.de>
* Choose better devnumbers and tidy up some issues with finding names.Neil Brown2006-05-261-0/+7
| | | | 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>
* Add information about reshape to --detailNeil Brown2006-03-281-13/+19
| | | | | | Also fix problems with dev names and symlinks Signed-off-by: Neil Brown <neilb@suse.de>
* Create missing /dev files where needed.Neil Brown2006-03-281-3/+9
| | | | | | | 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>
* Make scanning of /dev work even if it is a symlinkNeil Brown2006-03-271-1/+8
| | | | | | | | We generally don't want to follow symlinks in /dev, but if /dev itself is a symlink, we want to follow it. So nftw needs a bit of help. Signed-off-by: Neil Brown <neilb@suse.de>
* Remove ident arg from getinfo_super;Neil Brown2006-03-271-4/+2
| | | | | | Add a 'name' field to 'info' to compensate. Signed-off-by: Neil Brown <neilb@suse.de>
* Initial reshape supportNeil Brown2006-03-131-28/+0
| | | | | | Needs work for other levels etc. Signed-off-by: Neil Brown <neilb@suse.de>
* Fix printing of size of reiserfs filesystem.Neil Brown2006-01-311-2/+2
| | | | | | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=318230 Signed-off-by: Neil Brown <neilb@suse.de>
* Report device size correctly in --detail for Large devices.Neil Brown2006-01-301-2/+2
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Stuff like..Neil Brown2006-01-301-0/+29
| | | | | | | | | - 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>
* Allow scanning of devices listed in /proc/partitions independant of /devNeil Brown2005-12-051-1/+22
| | | | | | | 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>
* Fix assembling of raid10 in the face of missing devices.Neil Brown2005-09-121-2/+23
| | | | | | | 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>
* Print descriptive level when warning about pre-existing arrays.Neil Brown2005-08-181-2/+5
| | | | | | Use map_num to get the name, so 'linear' doens't appear as '-1'. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Support nameing of version-1 arrays.Neil Brown2005-08-091-2/+4
| | | | | | | --name is recognised in --create and --assemble name= is recognised in config file. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Assorted Fixes for multiple bugs.Neil Brown2005-08-041-8/+27
| | | | | | | Assemble would crash, or just not work. A few other problem found by a new test-suite. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Fix compilation with tinycNeil Brown2005-06-141-1/+6
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Replace sprintf calls with snprintfNeil Brown2005-06-141-9/+9
| | | | | | To quiet diet-libc Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Add device files created with --auto to list of known device files.Neil Brown2005-06-141-10/+13
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* When finding a /dev name for a device, prefer shorter namesNeil Brown2005-06-141-7/+15
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Fix some rounding errors in human_size and generally clean up the codeNeil Brown2005-06-141-13/+20
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Fix parsing of /dev/md/N in is_standardNeil Brown2005-06-141-1/+1
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>