Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/597'
Browse files Browse the repository at this point in the history
* origin/pr/597:
  Use 'dmsetup remove --retry'
  • Loading branch information
marmarek committed Jun 12, 2024
2 parents 8a1dfc7 + aa86d39 commit e2525d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions linux/system-config/destroy-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ case $node in
if is_unused "$snap"; then
# unused snapshot - remove it
deps+=" $(deps "$snap")"
dmsetup -- remove "$snap"
dmsetup remove --retry -- "$snap"
else
has_snapshot=true
fi
Expand All @@ -55,7 +55,7 @@ case $node in
esac

if [[ "$has_snapshot" = 'false' ]] && [[ -e "$node" ]]; then
dmsetup -- remove "$node"
dmsetup remove --retry -- "$node"
fi

# try to free unused devices
Expand All @@ -66,7 +66,7 @@ for dev in $deps; do
losetup -d "$dev" 2> /dev/null || true
;;
/dev/dm-*)
dmsetup remove "$dev" 2> /dev/null || true
dmsetup remove --retry -- "$dev" 2> /dev/null || true
;;
esac
fi
Expand Down

0 comments on commit e2525d3

Please sign in to comment.