5
0
mirror of git://git.proxmox.com/git/pve-storage.git synced 2024-12-22 13:34:16 +03:00

diskmanage: don't set usage for unused partitions

The disk type is already 'partition' so there's no additional
information here. And it would need to serve as a code-word for
unused partitions. The cleaner approach is to not set the usage.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fabian Ebner 2021-10-06 11:18:43 +02:00 committed by Thomas Lamprecht
parent bd46e59b5d
commit ff91cfae35

View File

@ -661,7 +661,7 @@ sub get_disks {
# for devices, this check is done explicitly later
return 'Device Mapper' if !dir_is_empty("$sysdir/holders");
return 'partition';
return; # unused partition
};
my $collect_ceph_info = sub {
@ -730,7 +730,6 @@ sub get_disks {
my $used = $determine_usage->($devpath, $sysdir, 0);
if (!$include_partitions) {
foreach my $part (sort keys %{$partitions}) {
next if $partitions->{$part}->{used} eq 'partition';
$used //= $partitions->{$part}->{used};
}
} else {