[pve-devel] [PATCH storage] ZFSPoolPlugin: fix #2662 get volume size correctly

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Apr 7 12:27:25 CEST 2020


On April 7, 2020 11:28 am, Aaron Lauterer wrote:
> 
> 
> On 4/3/20 5:07 PM, Fabian Grünbichler wrote:
>> there's another instance of 'zfs list ...' in PVE::Storage that could
>> also be switched to '-p'
> 
> Which one do you mean? Line 610?
> 
>    1     if ($format eq 'subvol') { 
> 
> 610         my $size = $class->zfs_request($scfg, undef, 'list', '-H', 
> '-o', 'refquota', "$scfg->{pool}/$basename");
>    1         chomp($size);
> 
> I don't see much chances for a bug here as the value is used right away 
> in the next step but it would definitely be more precise to use the -p flag.

the bug is that the parse_size sub is very broken, so we should get rid 
of it ;)




More information about the pve-devel mailing list