all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dietmar Maurer <dietmar@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [RFC proxmox-backup v2 0/4] more flexible HumanByte type
Date: Wed, 17 Nov 2021 14:37:16 +0100	[thread overview]
Message-ID: <20211117133720.1799124-1-dietmar@proxmox.com> (raw)

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





             reply	other threads:[~2021-11-17 13:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-17 13:37 Dietmar Maurer [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211117133720.1799124-1-dietmar@proxmox.com \
    --to=dietmar@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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