public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH storage] zfs: fix unmount request
@ 2021-08-05  8:33 Fabian Ebner
  2021-08-12  9:55 ` [pve-devel] applied: " Fabian Grünbichler
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Ebner @ 2021-08-05  8:33 UTC (permalink / raw)
  To: pve-devel

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>
---
 PVE/Storage/ZFSPoolPlugin.pm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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;
-- 
2.30.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied:  [PATCH storage] zfs: fix unmount request
  2021-08-05  8:33 [pve-devel] [PATCH storage] zfs: fix unmount request Fabian Ebner
@ 2021-08-12  9:55 ` Fabian Grünbichler
  0 siblings, 0 replies; 2+ messages in thread
From: Fabian Grünbichler @ 2021-08-12  9:55 UTC (permalink / raw)
  To: Proxmox VE development discussion

thanks!

On August 5, 2021 10:33 am, Fabian Ebner wrote:
> 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>
> ---
>  PVE/Storage/ZFSPoolPlugin.pm | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> 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;
> -- 
> 2.30.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-12  9:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05  8:33 [pve-devel] [PATCH storage] zfs: fix unmount request Fabian Ebner
2021-08-12  9:55 ` [pve-devel] applied: " Fabian Grünbichler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal