check base image use count inside vdisk_free

To make it work with all storage types.
This commit is contained in:
Dietmar Maurer
2013-02-01 06:55:39 +01:00
parent c803c3963c
commit 32437ed279
8 changed files with 27 additions and 24 deletions

View File

@ -235,7 +235,7 @@ sub alloc_image {
}
sub free_image {
my ($class, $storeid, $scfg, $volname) = @_;
my ($class, $storeid, $scfg, $volname, $isBase) = @_;
my $cmd = &$rbd_cmd($scfg, $storeid, 'snap', 'purge', $volname);
run_command($cmd, errmsg => "rbd snap purge $volname' error", outfunc => sub {}, errfunc => sub {});