ZTS: Fix zfs_mount.kshlib cleanup

Update cleanup_filesystem to use destroy_dataset when performing
cleanup.  This ensures the destroy is retried if the pool is busy
preventing occasional failures.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <guss80@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #10358
This commit is contained in:
Brian Behlendorf 2020-05-23 17:13:42 -07:00 committed by GitHub
parent fb822260b1
commit c946d5a913
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ function cleanup_filesystem #pool #fs
if datasetexists "$pool/$fs" ; then
mtpt=$(get_prop mountpoint "$pool/$fs")
log_must zfs destroy -r $pool/$fs
destroy_dataset "$pool/$fs" "-r"
[[ -d $mtpt ]] && \
log_must rm -rf $mtpt