[pve-devel] [PATCH v3 storage 1/3] rbd: path: don't build the entire path if we don't use it
Fabian Grünbichler
f.gruenbichler at proxmox.com
Mon Jul 11 14:04:37 CEST 2016
applied whole series
On Mon, Jul 11, 2016 at 01:55:47PM +0200, Wolfgang Bumiller wrote:
> ---
> No changes to v2
> PVE/Storage/RBDPlugin.pm | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
> index 2ef7573..ced9af0 100644
> --- a/PVE/Storage/RBDPlugin.pm
> +++ b/PVE/Storage/RBDPlugin.pm
> @@ -299,10 +299,12 @@ sub path {
> my ($vtype, $name, $vmid) = $class->parse_volname($volname);
> $name .= '@'.$snapname if $snapname;
>
> + my $pool = $scfg->{pool} ? $scfg->{pool} : 'rbd';
> + return ("/dev/rbd/$pool/$name", $vmid, $vtype) if $scfg->{krbd};
> +
> my $monhost = $scfg->{monhost};
> $monhost =~ s/:/\\:/g;
>
> - my $pool = $scfg->{pool} ? $scfg->{pool} : 'rbd';
> my $username = $scfg->{username} ? $scfg->{username} : 'admin';
>
> my $path = "rbd:$pool/$name:mon_host=$monhost";
> @@ -314,8 +316,6 @@ sub path {
> $path .= ":auth_supported=none";
> }
>
> - $path = "/dev/rbd/$pool/$name" if $scfg->{krbd};
> -
> return ($path, $vmid, $vtype);
> }
>
> --
> 2.1.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