]> git.proxmox.com Git - pve-storage.git/commitdiff
diskmanage: factor out mounted_blockdevs helper
authorFabian Ebner <f.ebner@proxmox.com>
Fri, 23 Apr 2021 10:14:52 +0000 (12:14 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 2 Jun 2021 09:56:51 +0000 (11:56 +0200)
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/Diskmanage.pm

index 612d97648fbbd76401a0891c73ba6be6ad86c22a..c188d8394bf133696d06dd66c5c5edae24164396 100644 (file)
@@ -481,10 +481,7 @@ my sub is_ssdlike {
     return $type eq 'ssd' || $type eq 'nvme';
 }
 
-sub get_disks {
-    my ($disks, $nosmart, $include_partitions) = @_;
-    my $disklist = {};
-
+sub mounted_blockdevs {
     my $mounted = {};
 
     my $mounts = PVE::ProcFSTools::parse_proc_mounts();
@@ -494,6 +491,15 @@ sub get_disks {
        $mounted->{abs_path($mount->[0])} = $mount->[1];
     };
 
+    return $mounted;
+}
+
+sub get_disks {
+    my ($disks, $nosmart, $include_partitions) = @_;
+    my $disklist = {};
+
+    my $mounted = mounted_blockdevs();
+
     my $lsblk_info = get_lsblk_info();
 
     my $journalhash = get_ceph_journals($lsblk_info);