Skip to content

Commit

Permalink
ZTS: Fix zfs_mount.kshlib cleanup
Browse files Browse the repository at this point in the history
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 openzfs#10358
  • Loading branch information
behlendorf authored and jsai20 committed Mar 30, 2021
1 parent 509dacb commit 69ba616
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 69ba616

Please sign in to comment.