From: Fiona Ebner <f.ebner@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH storage 2/2] rbd: volume resize: avoid passing floating point value to rbd
Date: Wed, 7 Jun 2023 10:51:17 +0200 [thread overview]
Message-ID: <8a308b24-bff2-36de-11b1-282d015ae9d4@proxmox.com> (raw)
In-Reply-To: <adba68af-a3b0-360f-1d41-988a92198e16@proxmox.com>
Am 06.06.23 um 19:37 schrieb Thomas Lamprecht:
> Am 28/04/2023 um 14:32 schrieb Fiona Ebner:
>>
>> - my $cmd = $rbd_cmd->($scfg, $storeid, 'resize', '--size', ($size/1024/1024), $name);
>> + my $cmd = $rbd_cmd->($scfg, $storeid, 'resize', '--size', ceil($size/1024/1024), $name);
>
>
> Hmm, but POSIX ceil is also returning a double `double ceil(double x)`, maybe wrap
> that into an int(), hedging against (future) perl is often a relatively good idea ^^
Thanks! While testing worked, it does seem a bit brittle without the int().
>
> FWIW: we often to something like int(($size + 1023)/1024/1024); (untested for this
> specific case).
>
This would also have avoided the new "use" statement, will go for that
next time.
next prev parent reply other threads:[~2023-06-07 8:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-28 12:32 [pve-devel] [PATCH-SERIES qemu-server/storage] improve RBD resize Fiona Ebner
2023-04-28 12:32 ` [pve-devel] [PATCH qemu-server 1/1] block resize: avoid passing zero size to QMP command Fiona Ebner
2023-04-28 12:32 ` [pve-devel] [PATCH storage 1/2] rbd: don't specify allow-shrink flag Fiona Ebner
2023-04-28 12:32 ` [pve-devel] [PATCH storage 2/2] rbd: volume resize: avoid passing floating point value to rbd Fiona Ebner
2023-06-06 17:37 ` Thomas Lamprecht
2023-06-07 8:51 ` Fiona Ebner [this message]
2023-06-06 17:45 ` [pve-devel] applied-series: [PATCH-SERIES qemu-server/storage] improve RBD resize Thomas Lamprecht
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=8a308b24-bff2-36de-11b1-282d015ae9d4@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=t.lamprecht@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.