From 65808c2cb29d2fc865211e554009d45dc15a048e Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Tue, 24 Feb 2026 14:12:03 -0800 Subject: [PATCH] Also use orphan scan wait code for remote unlink parts. The fix added in v1.26-17-gef0f6f8a does a good job of avoiding the intermittent test failures for the part that it was added. The remote unlink section could use it as well, as it suffers from the same intermediate failures. Signed-off-by: Auke Kok --- tests/tests/inode-deletion.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/tests/inode-deletion.sh b/tests/tests/inode-deletion.sh index 6a920187..648e6244 100644 --- a/tests/tests/inode-deletion.sh +++ b/tests/tests/inode-deletion.sh @@ -53,21 +53,26 @@ exec {FD1}>&- # close exec {FD2}>&- # close check_ino_index "$ino" "$dseq" "$T_M0" +# Hurry along the orphan scanners. If any are currently asleep, we will +# have to wait at least their current scan interval before they wake up, +# run, and notice their new interval. +t_save_all_sysfs_mount_options orphan_scan_delay_ms +t_set_all_sysfs_mount_options orphan_scan_delay_ms 500 +t_wait_for_orphan_scan_runs + echo "== remote unopened unlink deletes" echo "contents" > "$T_D0/file" ino=$(stat -c "%i" "$T_D0/file") dseq=$(scoutfs stat -s data_seq "$T_D0/file") rm -f "$T_D1/file" +# cross-mount deletion falls back to the orphan scanner when the +# creating mount still has the inode cached, wait for it to complete +t_force_log_merge +# wait for orphan scanners to pick up the unlinked inode and become idle +t_wait_for_no_orphans check_ino_index "$ino" "$dseq" "$T_M0" check_ino_index "$ino" "$dseq" "$T_M1" -# Hurry along the orphan scanners. If any are currently asleep, we will -# have to wait at least their current scan interval before they wake up, -# run, and notice their new interval. -t_save_all_sysfs_mount_options orphan_scan_delay_ms -t_set_all_sysfs_mount_options orphan_scan_delay_ms 500 -t_wait_for_orphan_scan_runs - echo "== unlink wait for open on other mount" echo "contents" > "$T_D0/badfile" ino=$(stat -c "%i" "$T_D0/badfile") @@ -81,7 +86,6 @@ exec {FD}>&- # close # we know that revalidating will unhash the remote dentry stat "$T_D0/badfile" 2>&1 | sed 's/cannot statx/cannot stat/' | t_filter_fs t_force_log_merge -# wait for orphan scanners to pick up the unlinked inode and become idle t_wait_for_no_orphans check_ino_index "$ino" "$dseq" "$T_M0" check_ino_index "$ino" "$dseq" "$T_M1"