all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [RFC proxmox-backup v2 0/4] more flexible HumanByte type
@ 2021-11-17 13:37 Dietmar Maurer
  2021-11-17 13:37 ` [pbs-devel] [RFC proxmox-backup v2 1/4] pbs-api-types: " Dietmar Maurer
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Dietmar Maurer @ 2021-11-17 13:37 UTC (permalink / raw)
  To: pbs-devel

Changes since v1:

- do not expose auto_unit functions
- store size as u64 (suggested by thomas)
- do not store unit (suggested by thomas)

The disadvantage is that the config value does not exactly
match the value you set, for example:

 proxmox-backup-manager traffic-control update rule0 --rate-out 1.2mib

config contains "1.198 MiB"

 proxmox-backup-manager traffic-control update rule0 --rate-out 1200kib

config contains "1.17 MiB"


Dietmar Maurer (4):
  pbs-api-types: more flexible HumanByte type
  use HumanByte for traffic-control config
  HumanByte: use u64 instead of f64 to store size
  HumanByte: do not store unit (always compute canonical form)

 pbs-api-types/src/human_byte.rs      | 326 +++++++++++++++++++++++++++
 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, 376 insertions(+), 89 deletions(-)
 create mode 100644 pbs-api-types/src/human_byte.rs

-- 
2.30.2





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-17 13:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-17 13:37 [pbs-devel] [RFC proxmox-backup v2 0/4] more flexible HumanByte type Dietmar Maurer
2021-11-17 13:37 ` [pbs-devel] [RFC proxmox-backup v2 1/4] pbs-api-types: " Dietmar Maurer
2021-11-17 13:37 ` [pbs-devel] [RFC proxmox-backup v2 2/4] use HumanByte for traffic-control config Dietmar Maurer
2021-11-17 13:37 ` [pbs-devel] [RFC proxmox-backup v2 3/4] HumanByte: use u64 instead of f64 to store size Dietmar Maurer
2021-11-17 13:37 ` [pbs-devel] [RFC proxmox-backup v2 4/4] HumanByte: do not store unit (always compute canonical form) Dietmar Maurer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal