Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use 'dmsetup remove --retry' #597

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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