]> git.proxmox.com Git - pve-storage.git/commit - PVE/Storage/ZFSPoolPlugin.pm
ZFSPoolPlugin: fix #2662 get volume size correctly
authorAaron Lauterer <a.lauterer@proxmox.com>
Tue, 7 Apr 2020 12:25:35 +0000 (14:25 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 9 Apr 2020 08:19:59 +0000 (10:19 +0200)
commitd99de0f898e8edc7bf1e2ae6e899bf16fbe298d0
treecaa81f44d427149c9537e9f9edeb3e969a61c0ab
parent8baa5ea9943db4fa866f6ea6af58a853b701ce80
ZFSPoolPlugin: fix #2662 get volume size correctly

Getting the volume sizes as byte values instead of converted to human
readable units helps to avoid rounding errors in the further processing
if the volume size is more on the odd side.

The `zfs list` command supports the -p(arseable) flag since a few years
now.
When returning the size in bytes there is no  calculation performed and
thus we need to explicitly cast the size to an integer before returning
it.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
PVE/Storage/ZFSPoolPlugin.pm