]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/PBSPlugin.pm
btrfs: do not reuse DirPlugins activate_storage directrly
[pve-storage.git] / PVE / Storage / PBSPlugin.pm
index ae45a1ad09c26802f2a08cb94ef5041838fa6dc6..bb1c3821fef6f90c9378a8a77940d73c69edcb47 100644 (file)
@@ -45,7 +45,7 @@ sub properties {
            type => 'string',
        },
        'master-pubkey' => {
-           description => "Base64-encoded, PEM-formatted public RSA key. Used tp encrypt a copy of the encryption-key which will be added to each encrypted backup.",
+           description => "Base64-encoded, PEM-formatted public RSA key. Used to encrypt a copy of the encryption-key which will be added to each encrypted backup.",
            type => 'string',
        },
        port => {
@@ -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);
@@ -595,6 +595,8 @@ sub free_image {
     my ($vtype, $name, $vmid) = $class->parse_volname($volname);
 
     run_client_cmd($scfg, $storeid, "forget", [ $name ], 1);
+
+    return;
 }
 
 
@@ -756,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 {
@@ -809,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;