From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 410BC806E3 for ; Thu, 18 Nov 2021 08:29:57 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 37E7A16EC4 for ; Thu, 18 Nov 2021 08:29:27 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 315C816EB1 for ; Thu, 18 Nov 2021 08:29:26 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id EF11A43DC1; Thu, 18 Nov 2021 08:29:25 +0100 (CET) From: Dietmar Maurer To: pbs-devel@lists.proxmox.com Date: Thu, 18 Nov 2021 08:29:20 +0100 Message-Id: <20211118072922.2233682-1-dietmar@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.488 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% 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 Subject: [pbs-devel] [RFC proxmox-backup v3 0/2] more flexible HumanByte type 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: , X-List-Received-Date: Thu, 18 Nov 2021 07:29:57 -0000 Changes since v2: - reverted changes from v2 - restrict number of possibleunits (always store KB instead of K) - store size without scaling to unit (avoid rounding errors in deserialze/serialze) - allow to specify precision in Display - new with_unit() constructor - improved dev docs Changes since v1: - do not expose auto_unit functions - store size as u64 (suggested by thomas) - do not store unit (suggested by thomas) *** BLURB HERE *** Dietmar Maurer (2): pbs-api-types: more flexible HumanByte type use HumanByte for traffic-control config pbs-api-types/src/human_byte.rs | 353 +++++++++++++++++++++++++++ pbs-api-types/src/lib.rs | 3 + pbs-api-types/src/traffic_control.rs | 18 +- pbs-client/src/backup_writer.rs | 19 +- pbs-datastore/src/datastore.rs | 13 +- pbs-tools/Cargo.toml | 1 + pbs-tools/src/format.rs | 55 +---- src/bin/proxmox-tape.rs | 7 +- src/cached_traffic_control.rs | 18 +- src/server/email_notifications.rs | 5 +- 10 files changed, 403 insertions(+), 89 deletions(-) create mode 100644 pbs-api-types/src/human_byte.rs -- 2.30.2