]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
generic/650: race mount and unmount with cpu hotplug too
authorDarrick J. Wong <djwong@kernel.org>
Tue, 29 Aug 2023 23:08:03 +0000 (16:08 -0700)
committerZorro Lang <zlang@kernel.org>
Sat, 2 Sep 2023 05:54:38 +0000 (13:54 +0800)
Ritesh Harjani reported that mount and unmount can race with the xfs cpu
hotplug notifier hooks and crash the kernel, which isfixed by:

https://lore.kernel.org/linux-xfs/ZO6J4W9msOixUk05@dread.disaster.area/T/#t

Extend this test to include that.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/generic/650

index 05c939b84f8bf7b785cbf1f4043b66d59644e973..773f93c7cbffc80bd235e37d0d7c5369809552dd 100755 (executable)
@@ -67,11 +67,18 @@ fsstress_args=(-w -d $stress_dir)
 nr_cpus=$((LOAD_FACTOR * nr_hotplug_cpus))
 test "$nr_cpus" -gt 1024 && nr_cpus="$nr_hotplug_cpus"
 fsstress_args+=(-p $nr_cpus)
-test -n "$SOAK_DURATION" && fsstress_args+=(--duration="$SOAK_DURATION")
+if [ -n "$SOAK_DURATION" ]; then
+       test "$SOAK_DURATION" -lt 10 && SOAK_DURATION=10
+       fsstress_args+=(--duration="$((SOAK_DURATION / 10))")
+fi
 
-nr_ops=$((25000 * TIME_FACTOR))
+nr_ops=$((2500 * TIME_FACTOR))
 fsstress_args+=(-n $nr_ops)
-$FSSTRESS_PROG $FSSTRESS_AVOID -w "${fsstress_args[@]}" >> $seqres.full
+for ((i = 0; i < 10; i++)); do
+       $FSSTRESS_PROG $FSSTRESS_AVOID -w "${fsstress_args[@]}" >> $seqres.full
+       _test_cycle_mount
+done
+
 rm -f $sentinel_file
 
 # success, all done