[pve-devel] [PATCH 15/44] storage : has_feature : parse_volname

Dietmar Maurer dietmar at proxmox.com
Thu Feb 14 09:54:45 CET 2013


But I really do not understand this. We want to pass the whole volname to volume_has_feature()?
Why do you want to change that?

> -----Original Message-----
> From: pve-devel-bounces at pve.proxmox.com [mailto:pve-devel-
> bounces at pve.proxmox.com] On Behalf Of Alexandre Derumier
> Sent: Dienstag, 05. Februar 2013 12:56
> To: pve-devel at pve.proxmox.com
> Subject: [pve-devel] [PATCH 15/44] storage : has_feature : parse_volname
> 
> 
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
>  PVE/Storage.pm |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/PVE/Storage.pm b/PVE/Storage.pm index c2f83a0..b625fa0
> 100755
> --- a/PVE/Storage.pm
> +++ b/PVE/Storage.pm
> @@ -190,7 +190,9 @@ sub volume_has_feature {
>      if ($storeid) {
>          my $scfg = storage_config($cfg, $storeid);
>          my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
> -        return $plugin->volume_has_feature($scfg, $feature, $storeid,
> $volname, $snap, $running);
> +        my ($vtype, $name, $vmid, $basename, $basevmid, $isBase) =
> +            $plugin->parse_volname($volname);
> +        return $plugin->volume_has_feature($scfg, $feature, $storeid,
> + $name, $snap, $running, $isBase);
>      } elsif ($volid =~ m|^(/.+)$| && -e $volid) {
>  	return undef;
>      } else {
> --
> 1.7.10.4
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel





More information about the pve-devel mailing list