]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/PBSPlugin.pm
fix #3580: plugins: make preallocation mode selectable for qcow2 and raw images
[pve-storage.git] / PVE / Storage / PBSPlugin.pm
index a439dd29a66c20fe1f02c11bb36b84cc6fdbf86d..bb1c3821fef6f90c9378a8a77940d73c69edcb47 100644 (file)
@@ -565,7 +565,7 @@ sub path {
 
     my $repo = PVE::PBSClient::get_repository($scfg);
 
-    # artifical url - we currently do not use that anywhere
+    # artificial url - we currently do not use that anywhere
     my $path = "pbs://$repo/$name";
 
     return ($path, $vmid, $vtype);
@@ -758,7 +758,7 @@ sub activate_storage {
        }
     }
 
-    die "$storeid: Cannot find datastore '$datastore', check permissions and existance!\n";
+    die "$storeid: Cannot find datastore '$datastore', check permissions and existence!\n";
 }
 
 sub deactivate_storage {
@@ -811,7 +811,9 @@ sub volume_size_info {
 
     my $size = 0;
     foreach my $info (@$data) {
-       $size += $info->{size} if $info->{size};
+       if ($info->{size} && $info->{size} =~ /^(\d+)$/) { # untaints
+           $size += $1;
+       }
     }
 
     my $used = $size;