]> git.proxmox.com Git - pve-cluster.git/commitdiff
code style and update some comments
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 14 Jul 2022 05:35:20 +0000 (07:35 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 14 Jul 2022 05:35:20 +0000 (07:35 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
data/PVE/Cluster.pm

index 05451fda76bd474b0817698279fe5b8b94e2a027..abcc46d36c00ce381279b4c61d26b69e1a94705f 100644 (file)
@@ -120,8 +120,7 @@ sub check_cfs_is_mounted {
 
     my $res = -l "$basedir/local";
 
-    die "pve configuration filesystem not mounted\n"
-       if !$res && !$noerr;
+    die "pve configuration filesystem (pmxcfs) not mounted\n" if !$res && !$noerr;
 
     return $res;
 }
@@ -359,18 +358,15 @@ sub get_guest_config_property {
 sub broadcast_tasklist {
     my ($data) = @_;
 
-    # the serialized list may not get bigger than 32kb (CFS_MAX_STATUS_SIZE
-    # from pmxcfs) - drop older items until we satisfy this constraint
+    # the serialized list may not get bigger than 128 KiB (CFS_MAX_STATUS_SIZE from pmxcfs)
+    # drop older items until we satisfy this constraint
     my $size = length(encode_json($data));
-    while ($size >= (32 * 1024)) {
+    while ($size >= (32 * 1024)) { # TODO: update to 128 KiB in PVE 8.x
        pop @$data;
        $size = length(encode_json($data));
     }
 
-    eval {
-       &$ipcc_update_status("tasklist", $data);
-    };
-
+    eval { $ipcc_update_status->("tasklist", $data) };
     warn $@ if $@;
 }