storage: volume_snapshot: add $running param
This add a $running param to volume_snapshot, it can be used if some extra actions need to be done at the storage layer when the snapshot has already be done at qemu level. Signed-off-by: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
This commit is contained in:
committed by
Wolfgang Bumiller
parent
73bfe226d6
commit
bb21ba381d
@ -449,13 +449,13 @@ sub volume_rollback_is_possible {
|
||||
}
|
||||
|
||||
sub volume_snapshot {
|
||||
my ($cfg, $volid, $snap) = @_;
|
||||
my ($cfg, $volid, $snap, $running) = @_;
|
||||
|
||||
my ($storeid, $volname) = parse_volume_id($volid, 1);
|
||||
if ($storeid) {
|
||||
my $scfg = storage_config($cfg, $storeid);
|
||||
my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
|
||||
return $plugin->volume_snapshot($scfg, $storeid, $volname, $snap);
|
||||
return $plugin->volume_snapshot($scfg, $storeid, $volname, $snap, $running);
|
||||
} elsif ($volid =~ m|^(/.+)$| && -e $volid) {
|
||||
die "snapshot file/device '$volid' is not possible\n";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user