lvm plugin: list images: properly handle qcow2 format
In particular, this also fixes volume rescan.
Fixes: eda88c9 ("lvmplugin: add qcow2 snapshot")
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Link: https://lore.proxmox.com/20250718102023.70591-2-f.ebner@proxmox.com
This commit is contained in:
committed by
Thomas Lamprecht
parent
9b6e138788
commit
aea2fcae82
@ -752,11 +752,17 @@ sub list_images {
|
||||
next if defined($vmid) && ($owner ne $vmid);
|
||||
}
|
||||
|
||||
my $format = ($class->parse_volname($volname))[6];
|
||||
my $size =
|
||||
$format eq 'qcow2'
|
||||
? $class->volume_size_info($scfg, $storeid, $volname)
|
||||
: $info->{lv_size};
|
||||
|
||||
push @$res,
|
||||
{
|
||||
volid => $volid,
|
||||
format => 'raw',
|
||||
size => $info->{lv_size},
|
||||
format => $format,
|
||||
size => $size,
|
||||
vmid => $owner,
|
||||
ctime => $info->{ctime},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user