From 854f1dceb6f1bb733518a8a77df670768d9f5392 Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Wed, 25 Sep 2013 10:27:43 +0200 Subject: [PATCH] check_volume_access : use parse_volname instead path to avoid extra calls for some storageplugins (zfs,nexenta). Signed-off-by: Alexandre Derumier --- PVE/RPCEnvironment.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PVE/RPCEnvironment.pm b/PVE/RPCEnvironment.pm index 765008e..ca845f0 100644 --- a/PVE/RPCEnvironment.pm +++ b/PVE/RPCEnvironment.pm @@ -290,8 +290,7 @@ sub check_volume_access { my $path; my ($sid, $volname) = PVE::Storage::parse_volume_id($volid, 1); if ($sid) { - my ($ownervm, $vtype); - ($path, $ownervm, $vtype) = PVE::Storage::path($storecfg, $volid); + my ($vtype, undef, $ownervm) = PVE::Storage::parse_volname($storecfg, $volid); if ($vtype eq 'iso' || $vtype eq 'vztmpl') { # we simply allow access } elsif (defined($ownervm) && defined($vmid) && ($ownervm == $vmid)) { -- 2.39.2