[pve-devel] [RFC v2 pve-container] support resizing of owned container mountpoints

Dietmar Maurer dietmar at proxmox.com
Thu Sep 3 11:36:38 CEST 2015



On 09/02/2015 02:40 PM, Wolfgang Bumiller wrote:
> diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
> index 5f23532..0544fd1 100644
> --- a/src/PVE/LXC.pm
> +++ b/src/PVE/LXC.pm
> @@ -1851,6 +1851,19 @@ sub blockdevices_list {
>   sub find_loopdev {
>       my ($loopdevs, $path) = @_;
>   
> +    if (!defined($loopdevs)) {
> +	my $found;
> +	my $parser = sub {
> +	    my $line = shift;
> +	    if ($line =~ m@^(/dev/loop\d+):@) {
> +		$found = $1;
> +	    }
> +	};
> +	my $cmd = ['losetup', '--associated', $path];
> +	PVE::Tools::run_command($cmd, outfunc => $parser);
> +	return $found;
> +    }
> +
>
That looks strange to me. I suggest to simply pass correct $loopdevs 
list instead.




More information about the pve-devel mailing list