summaryrefslogtreecommitdiffstats
path: root/tests/25raid456-reshape-deadlock
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-11-01 04:09:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-11-01 04:09:34 +0000
commit4de68785edd25915183b5f84f192ccaffd126a2f (patch)
treebc6c5cfb5ba70242a610199b36601974042967eb /tests/25raid456-reshape-deadlock
parentAdding upstream version 4.2+20230508. (diff)
downloadmdadm-a3553104b7143434500db5628e1c772cea063d09.tar.xz
mdadm-a3553104b7143434500db5628e1c772cea063d09.zip
Adding upstream version 4.2+20231026.upstream/4.2+20231026
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/25raid456-reshape-deadlock')
-rw-r--r--tests/25raid456-reshape-deadlock34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/25raid456-reshape-deadlock b/tests/25raid456-reshape-deadlock
new file mode 100644
index 0000000..bfa0cc5
--- /dev/null
+++ b/tests/25raid456-reshape-deadlock
@@ -0,0 +1,34 @@
+devs="$dev0 $dev1 $dev2"
+
+set_up_test()
+{
+ mdadm -Cv -R -n 3 -l5 $md0 $devs --size=50M || die "create array failed"
+ mdadm -a $md0 $dev3 || die "failed to bind new disk to array"
+ echo 1000 > /sys/block/md0/md/sync_speed_max
+}
+
+clean_up_test()
+{
+ echo idle > /sys/block/md0/md/sync_action
+ mdadm -S $md0
+}
+
+trap 'clean_up_test' EXIT
+
+set_up_test || die "set up test failed"
+
+# trigger reshape
+mdadm --grow -l 6 $md0
+sleep 1
+
+# stop reshape
+echo frozen > /sys/block/md0/md/sync_action
+
+# read accross reshape
+dd if=$md0 of=/dev/NULL bs=1m count=100 iflag=direct &> /dev/null &
+sleep 2
+
+# suspend array
+echo 1 > /sys/block/md0/md/suspend_lo
+
+exit 0