Skip to content

Commit

Permalink
ZTS: avoid race to unmount in zfs_rollback_001
Browse files Browse the repository at this point in the history
The zfs_rollback_001 test modifies files in a temporary, test dataset
repeatedly.  Before each iteration, any preexisting dataset is removed,
after unmounted with umount -f, if necessary.

Add a short delay after the forced unmount, avoiding a race that can
prevent zfs destroy from succeeding, leading to a test failure.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Antonio Russo <aerusso@aerusso.net>
Closes openzfs#11451
  • Loading branch information
aerusso authored and RageLtMan committed May 31, 2021
1 parent 3db9354 commit 3bf4f86
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ function test_n_check #opt num_snap_clone num_rollback
if datasetexists $VOL; then
if ismounted $TESTDIR1 $NEWFS_DEFAULT_FS; then
log_must umount -f $TESTDIR1
sleep 0.1
fi

log_must zfs destroy -Rf $VOL
Expand Down

0 comments on commit 3bf4f86

Please sign in to comment.