From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 5919176651 for ; Tue, 19 Oct 2021 09:55:11 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 576292993B for ; Tue, 19 Oct 2021 09:55:11 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 38FED298DC for ; Tue, 19 Oct 2021 09:55:09 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 98B3C468C0 for ; Tue, 19 Oct 2021 09:55:03 +0200 (CEST) From: Fabian Ebner To: pve-devel@lists.proxmox.com Date: Tue, 19 Oct 2021 09:54:51 +0200 Message-Id: <20211019075459.14328-3-f.ebner@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211019075459.14328-1-f.ebner@proxmox.com> References: <20211019075459.14328-1-f.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.270 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH storage 2/3] plugin: remove volume_snapshot_list X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2021 07:55:11 -0000 which was only used by replication, but now replication uses volume_snapshot_info instead. Signed-off-by: Fabian Ebner --- Breaks old pve-guest-common. Requires APIVER+APIAGE bump (it's in the next patch). PVE/Storage.pm | 16 ---------------- PVE/Storage/Plugin.pm | 9 --------- PVE/Storage/ZFSPlugin.pm | 6 ------ PVE/Storage/ZFSPoolPlugin.pm | 9 --------- 4 files changed, 40 deletions(-) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index f9582d0..5d389be 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -380,22 +380,6 @@ sub volume_snapshot_info { return $plugin->volume_snapshot_info($scfg, $storeid, $volname); } -sub volume_snapshot_list { - my ($cfg, $volid) = @_; - - my ($storeid, $volname) = parse_volume_id($volid, 1); - if ($storeid) { - my $scfg = storage_config($cfg, $storeid); - my $plugin = PVE::Storage::Plugin->lookup($scfg->{type}); - return $plugin->volume_snapshot_list($scfg, $storeid, $volname); - } elsif ($volid =~ m|^(/.+)$| && -e $volid) { - die "send file/device '$volid' is not possible\n"; - } else { - die "unable to parse volume ID '$volid'\n"; - } - # return an empty array if dataset does not exist. -} - sub get_image_dir { my ($cfg, $storeid, $vmid) = @_; diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm index d4b3615..42eabdf 100644 --- a/PVE/Storage/Plugin.pm +++ b/PVE/Storage/Plugin.pm @@ -1222,15 +1222,6 @@ sub volume_snapshot_info { die "volume_snapshot_info is not implemented for $class"; } -sub volume_snapshot_list { - my ($class, $scfg, $storeid, $volname) = @_; - - # implement in subclass - die "Volume_snapshot_list is not implemented for $class"; - - # return an empty array if dataset does not exist. -} - sub activate_storage { my ($class, $storeid, $scfg, $cache) = @_; diff --git a/PVE/Storage/ZFSPlugin.pm b/PVE/Storage/ZFSPlugin.pm index 5b84d85..d4dc2a4 100644 --- a/PVE/Storage/ZFSPlugin.pm +++ b/PVE/Storage/ZFSPlugin.pm @@ -391,12 +391,6 @@ sub volume_has_feature { return undef; } -sub volume_snapshot_list { - my ($class, $scfg, $storeid, $volname) = @_; - # return an empty array if dataset does not exist. - die "Volume_snapshot_list is not implemented for ZFS over iSCSI.\n"; -} - sub activate_storage { my ($class, $storeid, $scfg, $cache) = @_; diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm index 01d0743..278438b 100644 --- a/PVE/Storage/ZFSPoolPlugin.pm +++ b/PVE/Storage/ZFSPoolPlugin.pm @@ -532,15 +532,6 @@ sub volume_snapshot_info { return $info; } -sub volume_snapshot_list { - my ($class, $scfg, $storeid, $volname) = @_; - - my $snaps = []; - # return an empty array if dataset does not exist. - eval { $snaps = $class->zfs_get_sorted_snapshot_list($scfg, $volname, ['-S', 'name']); }; - return $snaps; -} - my sub dataset_mounted_heuristic { my ($dataset) = @_; -- 2.30.2