From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id CAA931FF16C for ; Tue, 17 Sep 2024 10:06:20 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D7C64123EC; Tue, 17 Sep 2024 10:06:27 +0200 (CEST) From: Gabriel Goller To: pbs-devel@lists.proxmox.com Date: Tue, 17 Sep 2024 10:05:50 +0200 Message-Id: <20240917080550.51803-2-g.goller@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20240917080550.51803-1-g.goller@proxmox.com> References: <20240917080550.51803-1-g.goller@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.044 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [mod.rs] Subject: [pbs-devel] [PATCH proxmox-backup v2 2/2] api: parallelize smartctl checks X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" VG8gaW1wcm92ZSB0aGUgcGVyZm9ybWFuY2Ugb2YgdGhlIHNtYXJ0Y3RsIGNoZWNrcywgZXNwZWNp YWxseSB3aGVuIGEgbG90Cm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otICAgICAgICBsZXQgbXV0IHN0YXR1cyA9IFNtYXJ0 U3RhdHVzOjpVbmtub3duOwotICAgICAgICBsZXQgbXV0IHdlYXJvdXQgPSBOb25lOwotCi0gICAg ICAgIGlmICFub19zbWFydCB7Ci0gICAgICAgICAgICBpZiBsZXQgT2soc21hcnQpID0gZ2V0X3Nt YXJ0X2RhdGEoJmRpc2ssIGZhbHNlKSB7Ci0gICAgICAgICAgICAgICAgc3RhdHVzID0gc21hcnQu c3RhdHVzOwotICAgICAgICAgICAgICAgIHdlYXJvdXQgPSBzbWFydC53ZWFyb3V0OwotICAgICAg ICAgICAgfQotICAgICAgICB9Ci0KICAgICAgICAgbGV0IGluZm8gPSBEaXNrVXNhZ2VJbmZvIHsK ICAgICAgICAgICAgIG5hbWU6IG5hbWUuY2xvbmUoKSwKICAgICAgICAgICAgIHZlbmRvciwKQEAg LTEwNjcsOCArMTA1OSw4IEBAIGZuIGdldF9kaXNrcygKICAgICAgICAgICAgIHNpemUsCiAgICAg ICAgICAgICB3d24sCiAgICAgICAgICAgICBkaXNrX3R5cGUsCi0gICAgICAgICAgICBzdGF0dXMs Ci0gICAgICAgICAgICB3ZWFyb3V0LAorICAgICAgICAgICAgc3RhdHVzOiBTbWFydFN0YXR1czo6 VW5rbm93biwKKyAgICAgICAgICAgIHdlYXJvdXQ6IE5vbmUsCiAgICAgICAgICAgICB1c2VkOiB1 c2FnZSwKICAgICAgICAgICAgIGdwdDogZGlzay5oYXNfZ3B0KCksCiAgICAgICAgICAgICBycG06 IGRpc2suYXRhX3JvdGF0aW9uX3JhdGVfcnBtKCksCkBAIC0xMDc3LDYgKzEwNjksMzAgQEAgZm4g Z2V0X2Rpc2tzKAogICAgICAgICByZXN1bHQuaW5zZXJ0KG5hbWUsIGluZm8pOwogICAgIH0KIAor ICAgIGlmICFub19zbWFydCB7CisgICAgICAgIGxldCAodHgsIHJ4KSA9IGNyb3NzYmVhbV9jaGFu bmVsOjpib3VuZGVkKHJlc3VsdC5sZW4oKSk7CisKKyAgICAgICAgbGV0IHBhcmFsbGVsX2hhbmRs ZXIgPQorICAgICAgICAgICAgUGFyYWxsZWxIYW5kbGVyOjpuZXcoInNtYXJ0Y3RsIGRhdGEiLCA0 LCBtb3ZlIHxkZXZpY2U6IChTdHJpbmcsIFN0cmluZyl8IHsKKyAgICAgICAgICAgICAgICBsZXQg c21hcnRfZGF0YSA9IGdldF9zbWFydF9kYXRhKFBhdGg6Om5ldygmZGV2aWNlLjEpLCBmYWxzZSk/ OworICAgICAgICAgICAgICAgIHR4LnNlbmQoKGRldmljZS4wLCBzbWFydF9kYXRhKSk/OworICAg ICAgICAgICAgICAgIE9rKCgpKQorICAgICAgICAgICAgfSk7CisKKyAgICAgICAgZm9yIChuYW1l LCBwYXRoKSBpbiBkZXZpY2VfcGF0aHMuaW50b19pdGVyKCkgeworICAgICAgICAgICAgaWYgbGV0 IFNvbWUocCkgPSBwYXRoIHsKKyAgICAgICAgICAgICAgICBwYXJhbGxlbF9oYW5kbGVyLnNlbmQo KG5hbWUsIHApKT87CisgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAgICAgICBwYXJhbGxl bF9oYW5kbGVyLmNvbXBsZXRlKCk/OworICAgICAgICB3aGlsZSBsZXQgT2sobXNnKSA9IHJ4LnJl Y3YoKSB7CisgICAgICAgICAgICBpZiBsZXQgU29tZSh2YWx1ZSkgPSByZXN1bHQuZ2V0X211dCgm bXNnLjApIHsKKyAgICAgICAgICAgICAgICB2YWx1ZS53ZWFyb3V0ID0gbXNnLjEud2Vhcm91dDsK KyAgICAgICAgICAgICAgICB2YWx1ZS5zdGF0dXMgPSBtc2cuMS5zdGF0dXM7CisgICAgICAgICAg ICB9CisgICAgICAgIH0KKyAgICB9CiAgICAgT2socmVzdWx0KQogfQogCi0tIAoyLjM5LjUKCgoK X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KcGJzLWRldmVs IG1haWxpbmcgbGlzdApwYnMtZGV2ZWxAbGlzdHMucHJveG1veC5jb20KaHR0cHM6Ly9saXN0cy5w cm94bW94LmNvbS9jZ2ktYmluL21haWxtYW4vbGlzdGluZm8vcGJzLWRldmVsCg==