[pve-devel] applied: [PATCH storage] Add comment for volume_has_feature
Fabian Grünbichler
f.gruenbichler at proxmox.com
Thu Apr 9 12:05:49 CEST 2020
thanks for the prompt follow-up!
On April 8, 2020 1:40 pm, Fabian Ebner wrote:
> Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
> ---
>
> Took the opportunity to document the whole function
> instead of just the new valid_target_formats option.
>
> PVE/Storage.pm | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/PVE/Storage.pm b/PVE/Storage.pm
> index 60b8310..48179b5 100755
> --- a/PVE/Storage.pm
> +++ b/PVE/Storage.pm
> @@ -285,6 +285,21 @@ sub volume_snapshot_delete {
> }
> }
>
> +# check if a volume or snapshot supports a given feature
> +# $feature - one of:
> +# clone - linked clone is possible
> +# copy - full clone is possible
> +# replicate - replication is possible
> +# snapshot - taking a snapshot is possible
> +# sparseinit - volume is sparsely initialized
> +# template - conversion to base image is possible
> +# $snap - check if the feature is supported for a given snapshot
> +# $running - if the guest owning the volume is running
> +# $opts - hash with further options:
> +# valid_target_formats - list of formats for the target of a copy/clone
> +# operation that the caller could work with. The
> +# format of $volid is always considered valid and if
> +# no list is specified, all formats are considered valid.
> sub volume_has_feature {
> my ($cfg, $feature, $volid, $snap, $running, $opts) = @_;
>
> --
> 2.20.1
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
More information about the pve-devel
mailing list