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 <f.ebner@proxmox.com>
This commit is contained in:
committed by
Fabian Grünbichler
parent
04bb277db4
commit
ab3516a6d7
@ -477,7 +477,10 @@ sub volume_snapshot_rollback {
|
|||||||
# caches, they get mounted in activate volume again
|
# caches, they get mounted in activate volume again
|
||||||
# see zfs bug #10931 https://github.com/openzfs/zfs/issues/10931
|
# see zfs bug #10931 https://github.com/openzfs/zfs/issues/10931
|
||||||
if ($format eq 'subvol') {
|
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;
|
return $msg;
|
||||||
|
|||||||
Reference in New Issue
Block a user