From: Fiona Ebner <f.ebner@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH pve-storage 1/2] common: add qemu_img_create an preallocation_cmd_option
Date: Tue, 27 May 2025 10:49:02 +0200 [thread overview]
Message-ID: <c61c6d1c-6976-40ec-9a1e-d560120b6e57@proxmox.com> (raw)
In-Reply-To: <mailman.559.1747921998.394.pve-devel@lists.proxmox.com>
Yes, this is a better place for such helpers :)
Am 22.05.25 um 15:53 schrieb Alexandre Derumier via pve-devel:
> Signed-off-by: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
> ---
> src/PVE/Storage/Common.pm | 53 ++++++++++++++++++++++++++++++
> src/PVE/Storage/GlusterfsPlugin.pm | 2 +-
> src/PVE/Storage/Plugin.pm | 47 +-------------------------
> 3 files changed, 55 insertions(+), 47 deletions(-)
>
> diff --git a/src/PVE/Storage/Common.pm b/src/PVE/Storage/Common.pm
> index bd9c951..0770d70 100644
> --- a/src/PVE/Storage/Common.pm
> +++ b/src/PVE/Storage/Common.pm
> @@ -5,12 +5,26 @@ use warnings;
>
> use PVE::JSONSchema;
> use PVE::Syscall;
> +use PVE::Tools qw(run_command);
>
> use constant {
> FALLOC_FL_KEEP_SIZE => 0x01, # see linux/falloc.h
> FALLOC_FL_PUNCH_HOLE => 0x02, # see linux/falloc.h
> };
>
> +our $QCOW2_PREALLOCATION = {
Should be made private with 'my' instead of 'our', as it's not (intended
to be) used anywhere else.
> + off => 1,
> + metadata => 1,
> + falloc => 1,
> + full => 1,
> +};
> +
> +our $RAW_PREALLOCATION = {
Same.
> + off => 1,
> + falloc => 1,
> + full => 1,
> +};
> +
> =pod
>
> =head1 NAME
> @@ -107,4 +121,43 @@ sub deallocate : prototype($$$) {
> }
> }
>
> +
> +sub preallocation_cmd_option {
All functions added to the common module should have a documentation
with POD, see existing functions in the module.
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-05-27 8:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250522135304.2513284-1-alexandre.derumier@groupe-cyllene.com>
2025-05-22 13:53 ` Alexandre Derumier via pve-devel
2025-05-27 8:49 ` Fiona Ebner [this message]
2025-05-22 13:53 ` [pve-devel] [PATCH pve-storage 2/2] common: qemu_img_create: add backing_file support Alexandre Derumier via pve-devel
2025-05-27 8:48 ` Fiona Ebner
2025-05-27 8:55 ` DERUMIER, Alexandre via pve-devel
[not found] <20250519102310.911326-1-alexandre.derumier@groupe-cyllene.com>
2025-05-19 10:23 ` [pve-devel] [PATCH pve-storage 1/2] common: add qemu_img_create an preallocation_cmd_option Alexandre Derumier via pve-devel
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=c61c6d1c-6976-40ec-9a1e-d560120b6e57@proxmox.com \
--to=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