From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Fabian Ebner <f.ebner@proxmox.com>
Subject: [pve-devel] applied: [PATCH manager] fix maxfiles behavior
Date: Mon, 16 Nov 2020 18:21:08 +0100 [thread overview]
Message-ID: <a13b7d60-ecff-d424-8b7c-aa183933999c@proxmox.com> (raw)
In-Reply-To: <20201109085633.12688-1-f.ebner@proxmox.com>
On 09.11.20 09:56, Fabian Ebner wrote:
> Commit 5ba2a605ac14de58572f7b8d6e04b45b34724b0a hard-coded 0 as the default
> for maxfiles in the --storage case, but the actual default should be the
> value from read_vzdump_defaults(), which obtains the value from
> /etc/vzdump.conf or the VZDump schema if the value has not been modified in
> that file. The initial default from the schema is 1, not 0.
> Tested on PVE 6.1 to verify that behavior.
>
> Move the sanity check for zero-ness to where we have the final value for
> maxfiles. Like this, we also have an implicit definedness check and more
> importantly, it is more future-proof in case we ever allow maxfiles 0 in the
> VZDump schema itself.
>
> Also, force conversion to int to be extra safe.
>
> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
> ---
>
> @Stefan: I wasn't able to trigger a warning about using '== 0' on a non-number type,
> the only thing I can get is:
> Use of uninitialized value in numeric eq (==)
>
> Does this patch work with your use case as well or is there something off?
>
> PVE/VZDump.pm | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
>
applied, thanks! But I really want tests for this after the releases...
prev parent reply other threads:[~2020-11-16 17:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-09 8:56 [pve-devel] " Fabian Ebner
2020-11-09 9:58 ` Stefan Reiter
2020-11-16 17:21 ` Thomas Lamprecht [this message]
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=a13b7d60-ecff-d424-8b7c-aa183933999c@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=f.ebner@proxmox.com \
--cc=pve-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