]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/Plugin.pm
Include new storage function volume_send.
[pve-storage.git] / PVE / Storage / Plugin.pm
index 6e73547bcb2426a3afce0a8f95a8f82fe6ce0551..d0df1f98b1d267a55012e668c2987d8c52464a29 100644 (file)
@@ -597,6 +597,12 @@ sub free_image {
 
     my $path = $class->filesystem_path($scfg, $volname);
 
+    if ($isBase) {
+       # try to remove immutable flag
+       eval { run_command(['/usr/bin/chattr', '-i', $path]); };
+       warn $@ if $@;
+    }
+
     if (defined($format) && ($format eq 'subvol')) {
        File::Path::remove_tree($path);
     } else {
@@ -606,12 +612,6 @@ sub free_image {
            return undef;
        }
 
-       if ($isBase) {
-           # try to remove immutable flag
-           eval { run_command(['/usr/bin/chattr', '-i', $path]); };
-           warn $@ if $@;
-       }
-
        unlink($path) || die "unlink '$path' failed - $!\n";
     }
     
@@ -697,6 +697,14 @@ sub volume_snapshot {
     return undef;
 }
 
+sub volume_send {
+    my ($class, $scfg, $storeid, $volname, $ip, $snap,
+       $incremental_snap, $verbose, $limit, $target_path) = @_;
+
+    # implement in subclass
+    die "Volume_send is not implemented for $class";
+}
+
 sub volume_rollback_is_possible {
     my ($class, $scfg, $storeid, $volname, $snap) = @_;