]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/BTRFSPlugin.pm
zfs: list: only cache and list images for requested storage/pool
[pve-storage.git] / PVE / Storage / BTRFSPlugin.pm
index 1407f443f1f5e83964345b4b1f926da4ee8664f9..1db4e4f8712fd23ebb8e2eba6292ac836cfd6432 100644 (file)
@@ -67,12 +67,14 @@ sub options {
        shared => { optional => 1 },
        disable => { optional => 1 },
        maxfiles => { optional => 1 },
-       'prune-backups'=> { optional => 1 },
+       'prune-backups' => { optional => 1 },
+       'max-protected-backups' => { optional => 1 },
        content => { optional => 1 },
        format => { optional => 1 },
        is_mountpoint => { optional => 1 },
        nocow => { optional => 1 },
        mkdir => { optional => 1 },
+       preallocation => { optional => 1 },
        # TODO: The new variant of mkdir with  `populate` vs `create`...
     };
 }
@@ -136,9 +138,22 @@ sub status {
     return PVE::Storage::DirPlugin::status($class, $storeid, $scfg, $cache);
 }
 
-# TODO: sub get_volume_notes {}
+sub get_volume_attribute {
+    my ($class, $scfg, $storeid, $volname, $attribute) = @_;
+    return PVE::Storage::DirPlugin::get_volume_attribute($class, $scfg, $storeid, $volname, $attribute);
+}
 
-# TODO: sub update_volume_notes {}
+sub update_volume_attribute {
+    my ($class, $scfg, $storeid, $volname, $attribute, $value) = @_;
+    return PVE::Storage::DirPlugin::update_volume_attribute(
+       $class,
+       $scfg,
+       $storeid,
+       $volname,
+       $attribute,
+       $value,
+    );
+}
 
 # croak would not include the caller from within this module
 sub __error {
@@ -515,7 +530,7 @@ sub volume_snapshot {
 }
 
 sub volume_rollback_is_possible {
-    my ($class, $scfg, $storeid, $volname, $snap) = @_; 
+    my ($class, $scfg, $storeid, $volname, $snap, $blockers) = @_;
 
     return 1; 
 }
@@ -591,18 +606,21 @@ sub volume_has_feature {
            current => { raw => 1 },
            snap => { raw => 1 },
        },
-       template => { current => { qcow2 => 1, raw => 1, vmdk => 1, subvol => 1 } },
+       template => {
+           current => { qcow2 => 1, raw => 1, vmdk => 1, subvol => 1 },
+       },
        copy => {
            base => { qcow2 => 1, raw => 1, subvol => 1, vmdk => 1 },
            current => { qcow2 => 1, raw => 1, subvol => 1, vmdk => 1 },
            snap => { qcow2 => 1, raw => 1, subvol => 1 },
        },
-       sparseinit => { base => {qcow2 => 1, raw => 1, vmdk => 1 },
-                       current => {qcow2 => 1, raw => 1, vmdk => 1 } },
+       sparseinit => {
+           base => { qcow2 => 1, raw => 1, vmdk => 1 },
+           current => { qcow2 => 1, raw => 1, vmdk => 1 },
+       },
     };
 
-    my ($vtype, $name, $vmid, $basename, $basevmid, $isBase, $format) =
-       $class->parse_volname($volname);
+    my ($vtype, $name, $vmid, $basename, $basevmid, $isBase, $format) = $class->parse_volname($volname);
 
     my $key = undef;
     if ($snapname) {