[PATCH v6 4/8] include: Introduce virDomainDirtyRateCalcFlags
Michal Prívozník
mprivozn at redhat.com
Mon Feb 21 12:35:06 UTC 2022
On 2/20/22 14:28, huangy81 at chinatelecom.cn wrote:
> From: Hyman Huang(黄勇) <huangy81 at chinatelecom.cn>
>
> Introduce virDomainDirtyRateCalcFlags to get ready for
> adding mode parameter to qemuDomainStartDirtyRateCalc.
>
> Signed-off-by: Hyman Huang(黄勇) <huangy81 at chinatelecom.cn>
> ---
> include/libvirt/libvirt-domain.h | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
> index 8c16598..2d57183 100644
> --- a/include/libvirt/libvirt-domain.h
> +++ b/include/libvirt/libvirt-domain.h
> @@ -5259,6 +5259,19 @@ typedef enum {
> # endif
> } virDomainDirtyRateStatus;
>
> +/**
> + * virDomainDirtyRateCalcFlags:
> + *
> + * Flags OR'ed together to provide specific behaviour when calculating dirty page
> + * rate for a Domain
> + *
> + */
> +typedef enum {
> + VIR_DOMAIN_DIRTYRATE_MODE_PAGE_SAMPLING = 0, /* default mode - page-sampling */
> + VIR_DOMAIN_DIRTYRATE_MODE_DIRTY_BITMAP = 1 << 0, /* dirty-bitmap mode */
> + VIR_DOMAIN_DIRTYRATE_MODE_DIRTY_RING = 1 << 1, /* dirty-ring mode */
> +} virDomainDirtyRateCalcFlags;
> +
> int virDomainStartDirtyRateCalc(virDomainPtr domain,
> int seconds,
> unsigned int flags);
This is the correct places to introduce VIR_EXCLUSIVE_FLAGS_GOTO()
checks to the public API and also describe flags in the API comment (as
done in 7/8).
Michal
More information about the libvir-list
mailing list