replace volume_support_qemu_snapshot with volume_qemu_snapshot
This also changes the return values, since their meanings are rather weird from the storage point of view. For instance, "internal" meant it is *not* the storage which does the snapshot, while "external" meant a mixture of storage and qemu-server side actions. `undef` meant the storage does it all... ┌────────────┬───────────┐ │ previous │ new │ ├────────────┼───────────┤ │ "internal" │ "qemu" │ │ "external" │ "mixed" │ │ undef │ "storage" │ └────────────┴───────────┘ Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
@ -1301,11 +1301,12 @@ sub rename_snapshot {
|
||||
lvrename($scfg, $source_snap_volname, $target_snap_volname);
|
||||
}
|
||||
|
||||
sub volume_support_qemu_snapshot {
|
||||
sub volume_qemu_snapshot_method {
|
||||
my ($class, $storeid, $scfg, $volname) = @_;
|
||||
|
||||
my $format = ($class->parse_volname($volname))[6];
|
||||
return 'external' if $format eq 'qcow2';
|
||||
return 'mixed' if $format eq 'qcow2';
|
||||
return 'storage';
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user