storage: remove $running param from volume_snapshot

not needed anymore after change in qemu-server

Signed-off-by: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
This commit is contained in:
Alexandre Derumier
2025-07-16 08:31:53 +02:00
committed by Wolfgang Bumiller
parent 4ef8ab60f6
commit e17a33794c
10 changed files with 15 additions and 32 deletions

View File

@ -959,21 +959,12 @@ sub volume_size_info {
}
sub volume_snapshot {
my ($class, $scfg, $storeid, $volname, $snap, $running) = @_;
my ($class, $scfg, $storeid, $volname, $snap) = @_;
my ($vmid, $format) = ($class->parse_volname($volname))[2, 6];
die "can't snapshot '$format' volume\n" if $format ne 'qcow2';
if ($running) {
#rename with blockdev-reopen is done at qemu level when running
eval { alloc_snap_image($class, $storeid, $scfg, $volname, $snap) };
if ($@) {
die "can't allocate new volume $volname: $@\n";
}
return;
}
$class->activate_volume($storeid, $scfg, $volname);
#rename current volume to snap volume