summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Detail: Export reshape statusMateusz Kusiak5 days1-0/+3
| | | | | | | | | | Display if there's an ongoing reshape happening in mdadm --detail --export output. This change is needed for incoming patches that will change "grow continue" udev rules, to be based on actual array state. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
* Remove --freeze-reshape logicMateusz Kusiak5 days5-69/+7
| | | | | | | | | | | | | | This commit removes --freeze-reshape logic, it basicaly reverts commit b76b30e0f950 ("Do not continue reshape during initrd phase"). --freeze-reshape was supposed to be used to restore critical sector in incremental and assemble operations without starting a reshape process, but it's meaning has been lost through the years and it is not currently used. A replacement for this logic will be added in incoming patches, so reshapes won't be started in initrd phrase. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
* mdadm.man: Remove external bitmapMariusz Tkaczyk8 days1-49/+6
| | | | | | Remove external bitmap support from manual. Signed-off-by: Mariusz Tkaczyk <mtkaczyk@kernel.org>
* mdadm: add MAINTAINERS fileNigel Croxon9 days1-0/+32
| | | | | | | Create a maintainers file to keep track of people to contact when dealing with mdadm questions/issues. Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
* checkpatch.conf: ignore NEW_TYPEDEFSMariusz Tkaczyk2024-12-161-0/+1
| | | | | | In mdadm, we have more flexible apporach to typedefs. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* Incremental: Simplify remove logicMariusz Tkaczyk2024-12-164-48/+102
| | | | | | Incremental_remove() does not execute Manage_subdevs() now. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* sysfs: functions for writing md/<memb>/stateMariusz Tkaczyk2024-12-165-11/+59
| | | | | | | Add dedicated enum to reflect possible values for mentioned file. Not all values are mapped. Add map to present sysfs keywords. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* Incremental: Document workaroundMariusz Tkaczyk2024-12-161-6/+22
| | | | | | Keep it documented in code. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* Coverity fixes resources leaksNigel Croxon2024-12-163-4/+8
| | | | | | Handle variable going out of scope leaks the handle. Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
* Release mdadm-4.4mdadm-4.4Mariusz Tkaczyk2024-12-134-4/+39
| | | | Signed-off-by: Mariusz Tkaczyk <mtkaczyk@kernel.org>
* tests: increase sleeps from 1s to 2sMateusz Kusiak2024-12-1326-47/+47
| | | | | | | | | | | The issue here is that some of the tests sporadically fail due to things being still processed. Default 1s delays proven not to be sufficient for newly created CI, as tests tend to ocassionally fail. This patch increases default 1s sleep to 2s, to hopefully get rid of sporadical fails. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
* tests: increase sleeps for 04r5swap and 05r testsMateusz Kusiak2024-12-1310-22/+22
| | | | | | | This commit increases sleep times from 4 seconds to 6 as some of the tests seem to be randomly failing due to this. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
* tests: fix 01r5failMateusz Kusiak2024-12-131-1/+1
| | | | | | Increase sleep to 2s to give driver more time to stop recovery. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
* tests: fix 05r1-re-add-nosuperMateusz Kusiak2024-12-131-0/+1
| | | | | | Add one second sleep before calling check() for array to process. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
* tests: fix 07autoassembleMateusz Kusiak2024-12-132-2/+3
| | | | | | | | | Block device check in testdev() is not sufficient as it does not account for symlinks. Fix the check to use lsblk instead. Add mdstat check for better debugging TC and change md0 for md127 as that will be array name after assembly. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
* tests: fix 07autodetectMateusz Kusiak2024-12-131-6/+2
| | | | | | | Change graceful exit to skip to indicate the test cannot be run. Add some sleep after creation, let's see if that's enough. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
* tests: mark 07changelevels brokenMateusz Kusiak2024-12-131-0/+7
| | | | | | | | | | Test 07changelevels can fail in multiple ways: - R5 -> R6 migration can make driver unresponsive - R6 -> R5 migration can fail Mark the test as broken to clear the CI. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
* tests: fix 07layoutsMateusz Kusiak2024-12-131-2/+2
| | | | | | | Remove redundant backup file creation so mdadm does not complain it already exists. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
* tests: remove redundant new-line from save_log()Mateusz Kusiak2024-12-131-1/+1
| | | | | | Remove redundant new-line character from "echo" call in save_log(). Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
* tests: skip 07testreshape5 if no test_stripeMateusz Kusiak2024-12-131-0/+3
| | | | | | | For test 07testreshape5 to succeed test_stripe binary must be first compiled. Add check to skip test if no binary. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
* tests: fix 09imsm-assembleMateusz Kusiak2024-12-131-6/+17
| | | | | | | Refactor imsm_check_removal() to give mdadm a chance to remove the device, add retries. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
* tests: fix 10ddf-createMateusz Kusiak2024-12-132-4/+7
| | | | | | | | | | There are two issues with 10ddf-create: - get_rootdev() failed if test was run in VM. Simplify and refactor the function. - tests fails at assemble due to segfault. Mark test as broken to clear the CI. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
* tests: fix 24raid10deadlockMateusz Kusiak2024-12-132-1/+1
| | | | | | | Skip tests if fault injection is not enabled. Remove 24raid10deadlock.inject_error empty file. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
* tests: add skip optionMateusz Kusiak2024-12-131-5/+19
| | | | | | | | | As for now the test either fails or succeeds. Add third option: skip. This is to be used for tests that might not be possible to execute for example due to missing (software) components or kernel not being compiled with debugging options. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
* tests: fix tests 25raid246Mateusz Kusiak2024-12-135-7/+12
| | | | | | | | | | | | This commit fixes tests 25raid246 so CI can pass. Details: - Change array size to 10M. - Change filesystem from xfc to ext4 (more distros should have toolset out of the box). - Mark 25raid456-reshape-while-recovery as broken. It's too much effort to fix it for now. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
* mdadm: remove bitmap file supportYu Kuai2024-12-039-296/+103
| | | | | | | | | | | Because it's marked deprecated for a long time now, and it's not worthy to support it for new bitmap. Now that we don't need to store filename for bitmap, also declare a new enum type bitmap_type to simplify code. Signed-off-by: Yu Kuai <yukuai3@huawei.com> Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* mdadm: ask user if bitmap is not setYu Kuai2024-12-032-12/+8
| | | | | | | | Instead of auto-forcing bitmap only for large arrays, it is more reasonable to let user do the chooice if bimtap is not set. Signed-off-by: Yu Kuai <yukuai3@huawei.com> Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* Manage: forbid re-add to the array without metadataYu Kuai2024-12-032-22/+17
| | | | | | | | | | | For the build mode or external metadata, re-add is not supported, because it will not trigger full disk recovery, user should add a new disk to the array instead. Also update test/05r1-re-add-nosuper to reflect this. Signed-off-by: Yu Kuai <yukuai3@huawei.com> Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* tests/05r1-re-add-nosuper: remove bitmap file testYu Kuai2024-12-031-4/+1
| | | | | | | Prepare to remove bitmap file support. Signed-off-by: Yu Kuai <yukuai3@huawei.com> Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* tests/04update-uuid: remove bitmap file testYu Kuai2024-12-031-34/+0
| | | | | | | Prepare to remove the bitmap file support. Signed-off-by: Yu Kuai <yukuai3@huawei.com> Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* test: Fix saving artifactsMariusz Tkaczyk2024-12-022-0/+24
| | | | | | | | | | | Currently, if error is returned by test command, execution of other steps is aborted. In that case, continue-on-error safe artifact but return error later and fail the job. If executions passed, there are no artifacts to safe, therefore do not safe them. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* test: return fail if any failedMariusz Tkaczyk2024-11-271-8/+12
| | | | | | GH action status should be failed if any test failed. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* test: Log execution timeMariusz Tkaczyk2024-11-271-0/+13
| | | | | | | To start optymalizing test suite, we need to know which tests are the most time consuming. Log execution time after every test. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* imsm: fix tpv drvies check in add_to_superBlazej Kucman2024-11-271-1/+2
| | | | | | | | | | | | | | | | Before the mentioned patch, the check to verify if IMSM on current platform supports a use of TPV (other than Intel) disk, was only performed for non-Intel disks, after it is performed for all. This change causes inability to use any disk when platform does not support TPV drives, attempt results in the following error. mdadm: Platform configuration does not support non-Intel NVMe drives. Please refer to Intel(R) RSTe/VROC user guide. This change restores the check if the disk is non-Intel. Fixes: 734e7db4dfc5 ("imsm: Remove warning and refactor add_to_super_imsm code") Signed-off-by: Blazej Kucman <blazej.kucman@intel.com>
* tests: fix "foreign" verification for nameing tests.Mariusz Tkaczyk2024-11-252-3/+5
| | | | | | | | | | Mdadm supports DEVNODE in multiple form, we cannot trust that because it does not always reflect name in metadata. Tests are defining clear expectations- we must use them. Do foreign verification against WANTED_NAME instead of passed DEVNODE. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* platform-intel: fix buffer overflowBlazej Kucman2024-11-251-2/+2
| | | | | | | | | | | | | | | | | mdadm -C /dev/md/imsm0 -e imsm -n 2 /dev/nvme5n1 /dev/nvme4n1 -R mdadm -C /dev/md/r0d2 -l 0 -n 2 /dev/nvme5n1 /dev/nvme4n1 -R *** buffer overflow detected ***: terminated Aborted (core dumped) Issue is related to D_FORTIFY_SOURCE=3 flag and depends on environment, especially compiler version. In function active_arrays_by_format length of path buffer is calculated dynamically based on parameters, while PATH_MAX is used in snprintf, this is my lead to buffer overflow. It is fixed by change dynamic length calculation, to use define PATH_MAX for path length. Signed-off-by: Blazej Kucman <blazej.kucman@intel.com>
* CI: run mdadm tests on test scripts changeKinga Stefaniuk2024-11-221-0/+2
| | | | | | Run mdadm tests scope on every change related to test files. Signed-off-by: Kinga Stefaniuk <kinga.stefaniuk@intel.com>
* debug: add timestamps for debug messagesMateusz Kusiak2024-11-223-9/+13
| | | | | | | | | | Timestamps on debug messages help establish what takes long to process. Debug messages are print only if DDEBUG flag is passed. Add timestamps for debug messages. Remove dead code from dprintf dummies for non-debug builds. Remove timestamps from current debug messages. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
* CI: assign ret to numeric valueKinga Stefaniuk2024-11-181-1/+2
| | | | | | | Use variable to store tests exit status. Return its value when test script finished. Signed-off-by: Kinga Stefaniuk <kinga.stefaniuk@intel.com>
* README: Rephrase mailing list chapterMariusz Tkaczyk2024-11-141-4/+4
| | | | | | | As suggested by Dan, make it sounds more welcomed. Suggested-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* CI: use self-hosted runner to run testsKinga Stefaniuk2024-11-142-0/+68
| | | | | | Use prepared VM machine in GitHub actions to run mdadm tests on it. Signed-off-by: Kinga Stefaniuk <kinga.stefaniuk@intel.com>
* func.sh: do not hang when grow-continue can't finishKinga Stefaniuk2024-11-132-9/+38
| | | | | | | | When grow-continue process is ongoing, sync_action indicates that recovery is in progress. If grow-continue does not finish, even if sync_action is not "reshape" anymore, the test should fail. Signed-off-by: Kinga Stefaniuk <kinga.stefaniuk@intel.com>
* Fix 07reshape5initr testKinga Stefaniuk2024-11-131-1/+15
| | | | | | | | This test could hang if "check" action is not written to sync_action. If this value didn't appear, test hanged on infinite while loop. Add 5 second timeout to loop. Signed-off-by: Kinga Stefaniuk <kinga.stefaniuk@intel.com>
* imsm: add print license for VMDBlazej Kucman2024-11-082-0/+52
| | | | | | | | Add print IMSM license for VMD controllers in --detail-platform. The license specifies the scope of RAID support in the platform for the VMD controller. Signed-off-by: Blazej Kucman <blazej.kucman@intel.com>
* tests: remove --autoMariusz Tkaczyk2024-11-073-8/+8
| | | | | | It is deprecated and it is not tested now. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* mdopen: remove wrong conditionMariusz Tkaczyk2024-11-061-5/+0
| | | | | | | | | | After mentioned patch, this condition get opposite meaning and it is blocking creation in cases where it was supported. Remove it now. Fixes: 119cdcad049e ("mdadm: drop auto= support") Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* mdadm.conf: remove refferences to old kernels.Mariusz Tkaczyk2024-11-051-1/+1
| | | | | | Remove them. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* md.man: Remove refferences to not supported kernelMariusz Tkaczyk2024-11-051-43/+12
| | | | | | Reader doesn't need it. Remove it. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* mdadm.man: Remove refferences to legacy kernelsMariusz Tkaczyk2024-11-051-85/+18
| | | | | | | We are not supporting kernels older than 3.10. Update mdadm man. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* mdadm: drop auto= supportMariusz Tkaczyk2024-11-0512-385/+60
| | | | | | | | | | | | According to author (and what was described in man): "With mdadm 3.0, device creation is normally left up to udev so this is option is unlikely to be needed" This was a workaround for kernel 2.6 family issues (partitionable and non-partitionable arrays hell) and I believe we are far away from it now. I'm not aware of any usage of it, hence it is removed. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>