Signed-off-by: Fabian Ebner <f.eb...@proxmox.com> --- Not sure if the expression for map{} is too cluttered here...
PVE/Replication.pm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/PVE/Replication.pm b/PVE/Replication.pm index 60cfc67..132e8bb 100644 --- a/PVE/Replication.pm +++ b/PVE/Replication.pm @@ -262,12 +262,8 @@ sub replicate { my ($base_snapshots, $last_snapshots, $last_sync_snapname) = find_common_replication_snapshot( $ssh_info, $jobid, $vmid, $storecfg, $sorted_volids, $state->{storeid_list}, $last_sync, $parent_snapname, $logfunc); - my $storeid_hash = {}; - foreach my $volid (@$sorted_volids) { - my ($storeid) = PVE::Storage::parse_volume_id($volid); - $storeid_hash->{$storeid} = 1; - } - $state->{storeid_list} = [ sort keys %$storeid_hash ]; + my %storeid_hash = map { (PVE::Storage::parse_volume_id($_))[0] => 1 } @$sorted_volids; + $state->{storeid_list} = [ sort keys %storeid_hash ]; # freeze filesystem for data consistency if ($freezefs) { -- 2.20.1 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel