From: Fabian Ebner Date: Thu, 5 Aug 2021 08:33:43 +0000 (+0200) Subject: zfs: fix unmount request X-Git-Url: https://git.proxmox.com/?p=pve-storage.git;a=commitdiff_plain;h=ab3516a6d7bce0cf7d269576ac496ecb73b1f005 zfs: fix unmount request by not dying when the dataset is already unmounted. Can be triggered for a container by doing two rollbacks in a row. Signed-off-by: Fabian Ebner --- diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm index c4be70f..660b3d9 100644 --- a/PVE/Storage/ZFSPoolPlugin.pm +++ b/PVE/Storage/ZFSPoolPlugin.pm @@ -477,7 +477,10 @@ sub volume_snapshot_rollback { # caches, they get mounted in activate volume again # see zfs bug #10931 https://github.com/openzfs/zfs/issues/10931 if ($format eq 'subvol') { - $class->zfs_request($scfg, undef, 'unmount', "$scfg->{pool}/$vname"); + eval { $class->zfs_request($scfg, undef, 'unmount', "$scfg->{pool}/$vname"); }; + if (my $err = $@) { + die $err if $err !~ m/not currently mounted$/; + } } return $msg;