[pve-devel] [PATCH v2 guest-common 1/3] vzdump.conf: make pigz a property string

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Feb 5 08:54:00 CET 2020


Am 2/4/20 um 3:56 PM schrieb Moayad Almalat:
> From: Moayad <m.almalat at proxmox.com>
> 
> and add blocksize property.
> 
> Signed-off-by: Moayad <m.almalat at proxmox.com>
> ---

Thanks for the patches, I'll will take a closer look today, a general comment below:
You sent a v2 without telling what changed, please always add a short changelog, like:
changes v1 -> v2:
* foo
* bar

or "no changes" if a single patch of a series stayed the same. Add that info here, where
this reply is, i.e., above the diff stat but below the "---" dashes separating the commit
message from the patch itself. Thanks!


>  PVE/VZDump/Common.pm | 26 ++++++++++++++++++++++----
>  1 file changed, 22 insertions(+), 4 deletions(-)
> 
> diff --git a/PVE/VZDump/Common.pm b/PVE/VZDump/Common.pm
> index 4789a50..0ee7aba 100644
> --- a/PVE/VZDump/Common.pm
> +++ b/PVE/VZDump/Common.pm
> @@ -60,6 +60,21 @@ sub parse_dow {
>      return $res;
>  };
>  
> +my $pigzdesc = {
> +    threads => {
> +	type => "integer",
> +	description => "Use pigz instead of gzip when N>0.".
> +	    " N=1 uses half of cores, N>1 uses N as thread count.",
> +	default => 0,
> +	default_key => 1,
> +    },
> +    blocksize => {
> +	type => "integer",
> +	description => "blocksize for compression with pigz",
> +	optional => 1,
> +    },
> +};
> +
>  my $confdesc = {
>      vmid => {
>  	type => 'string', format => 'pve-vmid-list',
> @@ -92,11 +107,10 @@ my $confdesc = {
>  	default => '0',
>      },
>      pigz=> {
> -	type => "integer",
> -	description => "Use pigz instead of gzip when N>0.".
> -	    " N=1 uses half of cores, N>1 uses N as thread count.",
> +	type => 'string',
> +	description => "pigz settings.",
> +	format => $pigzdesc,
>  	optional => 1,
> -	default => 0,
>      },
>      quiet => {
>  	type => 'boolean',
> @@ -220,6 +234,10 @@ sub get_confdesc {
>      return $confdesc;
>  }
>  
> +sub get_pigzdesc {
> +    return $pigzdesc;
> +}
> +
>  # add JSON properties for create and set function
>  sub json_config_properties {
>      my $prop = shift;
> 




More information about the pve-devel mailing list