aboutsummaryrefslogtreecommitdiffstats
path: root/util.c
AgeCommit message (Expand)AuthorFilesLines
46 hoursWait for mdmon when it is stared via systemdKinga Stefaniuk1-0/+29
46 hoursutil.c: change devnm to const in mdmon functionsKinga Stefaniuk1-2/+2
9 daysimsm: support RAID 10 with more than 4 drivesMateusz Kusiak1-14/+25
2024-03-22sysfs: remove vers parameter from sysfs_set_arrayMateusz Kusiak1-2/+1
2024-03-22mdadm: Fix native --detail --exportMariusz Tkaczyk1-11/+13
2024-03-12util.c: add limits.h include for NAME_MAX definitionAlexander Kanavin1-1/+1
2024-03-11Monitor, Incremental: use device policiesMariusz Tkaczyk1-4/+9
2024-03-11mdadm: Add functions for spare criteria verificationMariusz Tkaczyk1-53/+59
2024-01-24Replace "none" with macroMateusz Kusiak1-1/+1
2023-05-08mdadm: numbered names verificationMariusz Tkaczyk1-0/+44
2023-03-19mdmon: Improve switchroot interactions.NeilBrown1-3/+4
2023-03-19Use existence of /etc/initrd-release to detect initrd.NeilBrown1-9/+1
2023-03-08util.c: fix memleak in parse_layout_faulty()Wu Guanghao1-0/+2
2023-03-08util.c: reorder code lines in parse_layout_faulty()Coly Li1-3/+6
2023-03-02Add helpers to determine whether directories or files are soft linksMateusz Grzonka1-0/+45
2023-02-28Fix NULL dereference in super_by_fdLi Xiao Keng1-1/+6
2023-01-04util: remove obsolete code from get_md_nameMateusz Kusiak1-34/+17
2022-08-24Grow: Split Grow_reshape into helper functionMateusz Kusiak1-0/+14
2022-08-22mdadm: Replace obsolete usleep with nanosleepMateusz Grzonka1-9/+33
2022-06-24util: replace ioctl use with functionKinga Tanska1-1/+1
2022-04-04Replace error prone signal() with sigaction()Lukasz Florczak1-1/+0
2021-10-08Refactor parse_num and use it to parse optarg.Mateusz Grzonka1-11/+2
2021-08-13Utils: Change sprintf to snprintfMateusz Kusiak1-2/+2
2021-07-16mdadm: Fix building errorsXiao Ni1-1/+1
2020-11-25mdadm: Unify forks behaviourMariusz Tkaczyk1-44/+80
2020-05-18uuid.c: split uuid stuffs from util.cGuoqing Jiang1-87/+0
2020-01-21Add support for TebibytesKinga Tanska1-14/+33
2019-09-30mdadm: force a uuid swap on big endianNigel Croxon1-0/+4
2018-05-31imsm: Do not require MDADM_EXPERIMENTAL flag anymoreMichal Zylowski1-10/+0
2018-03-08mdadm: improve the dlm locking mechanism for clustered raidGuoqing Jiang1-14/+43
2017-11-09To support clustered raid10Guoqing Jiang1-0/+11
2017-10-02Zeroout whole ppl space during creation/force assemblePawel Baldysiak1-0/+49
2017-09-29util: Code is 80 characters wideJes Sorensen1-12/+21
2017-08-16Detail: correct output for active arraysMariusz Tkaczyk1-6/+9
2017-05-24Detail: don't exit if ioctl has been successfulTomasz Majchrzak1-1/+1
2017-05-16mdadm: Fixup more broken logical operator formattingJes Sorensen1-2/+1
2017-05-16mdadm: Fixup a large number of bad formatting of logical operatorsJes Sorensen1-12/+8
2017-05-09Add sector size as spare selection criterionAlexey Obitotskiy1-1/+30
2017-05-09Allow more spare selection criteriaAlexey Obitotskiy1-3/+3
2017-05-05mdadm/util: unify stat checking blkdev into functionZhilong Liu1-0/+17
2017-05-05mdadm/util: unify fstat checking blkdev into functionZhilong Liu1-0/+17
2017-05-03util: md_array_valid(): Introduce md_array_valid() helperJes Sorensen1-0/+24
2017-04-20util: Get rid of unused enough_fd()Jes Sorensen1-31/+0
2017-04-20util: Introduce md_array_active() helperJes Sorensen1-0/+27
2017-04-11Retire mdassembleJes Sorensen1-33/+4
2017-04-05util: Finally kill off md_get_version()Jes Sorensen1-29/+0
2017-04-05util/set_array_info: Simplify code since md_get_version returns a constantJes Sorensen1-11/+8
2017-04-05util/must_be_container: Use sysfs_read(GET_VERSION) to determine valid arrayJes Sorensen1-1/+6
2017-03-29util: Introduce md_set_array_info()Jes Sorensen1-2/+10
2017-03-29util: Introduce md_get_disk_info()Jes Sorensen1-1/+9
2017-03-29util: Introduce md_get_array_info()Jes Sorensen1-3/+11
2017-03-29util: Cosmetic changesJes Sorensen1-12/+10
2017-03-28Add 'force' flag to *hot_remove_disk().NeilBrown1-5/+5
2017-03-28Introduce sys_hot_remove_disk()NeilBrown1-0/+12
2017-03-28Retry HOT_REMOVE_DISK a few times.NeilBrown1-0/+18
2017-03-17mdadm: Specify enough length when write to bufferXiao Ni1-1/+1
2016-12-13Always return last partition end address in 512B blocksMariusz Dabrowski1-2/+5
2016-12-12Use disk sector size value to set offset for reading GPTMariusz Dabrowski1-1/+6
2016-11-17Add function for getting member drive sector sizePawel Baldysiak1-1/+17
2016-10-19Fix bus error when accessing MBR partition recordsJames Clarke1-7/+11
2016-09-22Fix RAID metadata checkMariusz Dabrowski1-11/+16
2016-08-15Introduce random_uuid() helper functionJes Sorensen1-0/+21
2016-08-11util: Never have if and return on the same lineJes Sorensen1-1/+2
2016-06-03Use dev_t for devnm2devid and devid2devnmMike Lovell1-3/+3
2016-03-08util: Remove unnecesary NULL pointer checks when calling sysfs_free()Jes Sorensen1-4/+2
2016-03-07Remove dead code about LKF_CONVERT flagGuoqing Jiang1-8/+0
2016-02-08util.c: include poll.h instead of sys/poll.hMaxin B. John1-1/+1
2016-02-08Fix some type comparison problemsXiao Ni1-1/+1
2016-01-28Assorted fixed for a "make everything" buildNeilBrown1-7/+19
2016-01-27util: fix wrong return value of cluster_get_dlmlockGuoqing Jiang1-10/+4
2015-12-17mdadm: improve the safeguard for change cluster raid's sbGuoqing Jiang1-12/+18
2015-10-21Make cmap_* also has same policy as dlm_*Guoqing Jiang1-34/+33
2015-10-21Safeguard against writing to an active device of another nodeGuoqing Jiang1-0/+148
2015-08-03mdassemble: don't try to perform cluster check.NeilBrown1-1/+2
2015-06-17Add a new clustered diskGuoqing Jiang1-0/+10
2015-06-17Set home-cluster while creating an arrayGuoqing Jiang1-0/+57
2015-04-08Assemble: allow a RAID4 to assemble easily when parity devices is missing.NeilBrown1-0/+7
2015-02-12Don't break long strings onto multiple lines.NeilBrown1-8/+4
2015-02-12Consistently print program Name and __func__ in debug messages.NeilBrown1-1/+1
2014-12-18util: remove rounding error where reporting "human sizes".NeilBrown1-4/+4
2014-08-11util: split get_maj_min() out from dev_open()NeilBrown1-5/+10
2014-05-22install: use BINDIR consistently to locate mdadm and mdmonNeilBrown1-1/+1
2014-03-20Work around architectures having statfs.f_type defined as longJes Sorensen1-1/+5
2013-12-05Assemble/Incremental: don't hold O_EXCL on mddev after assembly.NeilBrown1-0/+14
2013-12-05Two small fixes related to enough()NeilBrown1-2/+0
2013-11-20IMSM metadata really should be ignored when found on partitions.NeilBrown1-1/+1
2013-09-03Release mdadm-3.3mdadm-3.3NeilBrown1-1/+1
2013-09-02Make sure "mdmon" doesn't get called "@dmon".NeilBrown1-2/+2
2013-08-28in_initrd: fix gcc compiler errormwilck@arcor.de1-2/+2
2013-08-08Create: fix warning about pre-existing filesystems.NeilBrown1-5/+6
2013-08-05test: ensure testing uses correct mdmonNeilBrown1-30/+33
2013-08-01mdmon: don't lie to systemd.NeilBrown1-0/+11
2013-07-30super1: simplify setting of array size.NeilBrown1-0/+1
2013-07-02Move find_free_devnum to mdopen.cNeilBrown1-33/+0
2013-06-25Subject: Make wait_for and open_dev_excl fasterNeilBrown1-2/+8
2013-06-19Remove lots of unnecessary white space.NeilBrown1-1/+0
2013-06-19raid6check: Fix build of raid6checkBernd Schubert1-10/+0
2013-05-30Make sure NOFILE resource limit is big enough.NeilBrown1-0/+15
2013-05-21Change some fprintf(stderrs to cont_err()NeilBrown1-4/+4
2013-05-15Suppress error messages from systemctl.NeilBrown1-0/+5
2013-05-13mdassemble - fix new compile-time problems.NeilBrown1-1/+1
2013-02-21Discard devnum in favour of devnmNeilBrown1-70/+144
2013-02-05In case launching mdmon fails, print an error message before exitingJes Sorensen1-1/+4
2013-02-05Add support for launching mdmon via systemctl instead of fork/execJes Sorensen1-0/+28
2013-02-05Remove --offroot argument and default to always setting argv[0] to @Jes Sorensen1-11/+2
2013-01-10dev_open - don't bother trying map_devNeilBrown1-10/+6
2013-01-07conditionally remove map_dev from find_free_devnumNeilBrown1-6/+8
2012-11-20IMSM - allow assembling any imsm array even without OROM.NeilBrown1-3/+3
2012-10-22Remove get_one_diskNeilBrown1-12/+0
2012-10-11Fix open_containerNeilBrown1-0/+14
2012-10-10Replace a lot of leading spaces with tabs.NeilBrown1-17/+17
2012-10-04Allow data-offset to be specified per-device for createNeilBrown1-0/+3
2012-10-04Allow parse_size to return 0.NeilBrown1-3/+3
2012-10-04imsm: Allow to specify controller for --detail-platform.Maciej Naruszewicz1-0/+21
2012-10-03Fix 'enough' function for RAID10.NeilBrown1-3/+4
2012-10-02Display size with human_size_brief with a chosen prefixMaciej Naruszewicz1-9/+27
2012-10-02Synchronize size calculation in human_size and human_size_briefMaciej Naruszewicz1-13/+20
2012-09-20fix: adjust parse_size() to the unsigned size variableLukasz Dorau1-4/+5
2012-09-10Move xmalloc et al into their own fileRobert Buchholz1-40/+0
2012-08-20find_free_devnum: avoid auto-using names in /etc/mdadm.confNeilBrown1-0/+4
2012-08-13Minor cosmetic fixes in various files.NeilBrown1-45/+49
2012-07-09Create parse_num() function.NeilBrown1-0/+11
2012-07-09Remove scattered checks for malloc success.NeilBrown1-11/+47
2012-07-09Introduce pr_err for printing error messages.NeilBrown1-30/+25
2012-04-18Raid limit of 1024 when scanning for devices.NeilBrown1-2/+2
2012-04-04parse_size: distinguish between 0 and error.NeilBrown1-1/+2
2012-04-02simplify calculating array_blocksCzarnowska, Anna1-0/+2
2012-02-09FIX: NULL pointer to strdup() can be passedAdam Kwolek1-2/+3
2012-02-07Remove avail_disks arg from 'enough'.NeilBrown1-3/+8
2012-01-30Spawn mdmon with --offroot if mdadm was launched with --offrootJes Sorensen1-4/+13
2011-11-02enough_fd(): remember to free buffer for avail arrayJes Sorensen1-4/+5
2011-10-31Avoid stack overflow if GPT partition entries on disk are > 128 bytesJes Sorensen1-5/+8
2011-10-26util.c: two typos fixedLukasz Dorau1-1/+2
2011-10-17Fix off-by-one in readlink() buffer size handlingThomas Jarosch1-1/+1
2011-10-03Move code to get_data_disks() functionAdam Kwolek1-2/+8
2011-09-08Fix component size checks in validate_super0.NeilBrown1-1/+1
2011-09-07fix: segfault when killing subarray of non-existent containerCzarnowska, Anna1-1/+1
2011-09-07start_mdmon: provide more dynamic way to close-all-fdsNeilBrown1-3/+8
2011-08-01Add some more settings of ignore_hw_compatNeilBrown1-0/+1
2011-06-17util: correctly parse shorter linux version numbers.NeilBrown1-5/+5
2011-06-17Improvements to GPT reading code.Luca Berra1-18/+9
2011-05-23Check all member devices in enough_fdNeilBrown1-3/+10
2011-04-05Split some of util.c into a new lib.cNeilBrown1-211/+0
2011-04-05split name/number maps into separate file.NeilBrown1-21/+0
2011-03-24open_dev_excl: allow device to be read-only.devel-3.2NeilBrown1-1/+6
2011-03-23examine: allows to examine a disk metadata on non-metadata compliant systemsLabun, Marcin1-0/+3
2011-03-22mdmon: don't wait for O_EXCL when shutting down.NeilBrown1-2/+7
2011-03-14Warn the user about too small array sizeKrzysztof Wojcik1-1/+8
2011-03-10dev_open should always open read-only.NeilBrown1-1/+1
2011-02-01Various compile fixes.NeilBrown1-1/+1
2011-02-01Allow domain_test to report that no domains were found.NeilBrown1-1/+1
2011-02-01Incr: don't exclude 'active' devices from auto inclusion in a container.NeilBrown1-7/+1
2011-02-01Monitor: do not move partitions to external containerCzarnowska, Anna1-0/+13
2011-01-27fix extended partition detectionDan Williams1-1/+1
2011-01-05Use one function chosing spares from containerAnna Czarnowska1-0/+60
2010-12-26imsm: set imsm spare uuid to 0Anna Czarnowska1-5/+2
2010-12-16Allow a metadata update to have a linked list of allocated spaces.NeilBrown1-0/+1
2010-12-16Split fmt_devnum out from devnum2devnameNeilBrown1-2/+7
2010-11-29Treat feature as experimentalAdam Kwolek1-0/+10
2010-11-29Monitor: devid should be dev_tAnna Czarnowska1-1/+1
2010-11-29Incremental - avoid including wayward devices.NeilBrown1-0/+15
2010-11-23Initialize st->devnum and st->container_dev in super_by_fdDan Williams1-3/+7
2010-11-23block monitor: freeze spare assignment for external arraysDan Williams1-0/+25
2010-11-23Provide a mdstat_ent to subarray helperDan Williams1-7/+4
2010-11-22Util: get device size from idAnna Czarnowska1-0/+16
2010-11-22Add must_be_container helper.NeilBrown1-0/+14
2010-11-22Switch open_subarray to use the new load_containerNeilBrown1-6/+6
2010-11-22Use new load_container in ExamineNeilBrown1-1/+2
2010-11-22Remove subarray field in supertype.NeilBrown1-2/+0
2010-11-22Create: user container_dev rather than subarray for some tests.NeilBrown1-0/+3
2010-11-22Pass subarray arg explicitly to ->update_subarray.NeilBrown1-4/+12
2010-11-22super_by_fd: return subarray info explicitly.NeilBrown1-8/+5
2010-11-22open_subarray: pass subarray name as explicit arg.NeilBrown1-2/+4
2010-11-22get_info_super: report which other devices are thought to be working/failed.NeilBrown1-2/+2
2010-11-22Manage: be more careful about --add attempts.NeilBrown1-0/+30
2010-09-06Add guess_super_typeNeilBrown1-1/+5
2010-09-06Add gpt pseudo-metadataNeilBrown1-1/+1
2010-09-06Add mbr pseudo metadata handler.NeilBrown1-58/+7
2010-08-30Allow dev_open to work on read-only /devNeilBrown1-6/+20
2010-08-05Compile with -Wextra by defaultNeilBrown1-5/+5
2010-07-22Fix all the confusion over directories once and for all.Doug Ledford1-3/+1
2010-07-19Incremental: restore assembly for inactive containers, block activeDan Williams1-1/+6
2010-07-01Merge branch 'fixes' into for-neilDan Williams1-1/+5
2010-06-15Kill subarray v2Dan Williams1-0/+137
2010-05-17fix: memory leak in mdmon_pid()Przemyslaw Hawrylewicz Czarnowski1-1/+5
2010-04-29IMSM/DDF: don't recognised these metadata on partitions.NeilBrown1-0/+25
2010-03-24(no commit message)NeilBrown1-1/+6
2010-03-09Improve partition table code.NeilBrown1-21/+49
2010-03-03fix mdmon takeoverLuca Berra1-2/+2
2010-03-03fix gcc warnings about strict-aliasing rulesNeilBrown1-2/+5
2010-02-04mdmon: allow pid to be stored in different directory.NeilBrown1-1/+3
2010-02-04Having single function to read mdmon pid file.NeilBrown1-19/+7
2009-12-30Merge branch 'master' of git://github.com/djbw/mdadmNeilBrown1-3/+21
2009-12-21imsm: add support for checkpointing via 'curr_migr_unit'Dan Williams1-0/+15
2009-12-21Support external metadata recovery-resumeDan Williams1-1/+1
2009-12-21Teach sysfs_add_disk() callers to use ->recovery_start versus 'insync' parameterDan Williams1-2/+5
2009-12-12util: fix devnum2devname for devnum == 0Dan Williams1-1/+1
2009-12-08Check partition tables when creating array.Trela, Maciej1-0/+176
2009-11-17Replace all relevant occurrences of -4 with LEVEL_MULTIPATHNeilBrown1-2/+2
2009-10-22Merge branch 'master' into devel-3.1NeilBrown1-4/+8