Fabiano Rosas <[email protected]> writes:
> Add the direct-io migration parameter that tells the migration code to
> use O_DIRECT when opening the migration stream file whenever possible.
>
> This is currently only used with the fixed-ram migration that has a
> clear window guaranteed to perform aligned writes.
>
> Signed-off-by: Fabiano Rosas <[email protected]>
[...]
> diff --git a/qapi/migration.json b/qapi/migration.json
> index 3fce5fe53e..41241a2178 100644
> --- a/qapi/migration.json
> +++ b/qapi/migration.json
> @@ -878,6 +878,9 @@
> # @mode: Migration mode. See description in @MigMode. Default is 'normal'.
> # (Since 8.2)
> #
> +# @direct-io: Open migration files with O_DIRECT when possible. This
> +# requires that the 'fixed-ram' capability is enabled. (since 9.0)
'fixed-ram' is a cross-reference to MigrationCapability member
fixed-ram.
For local members, @name is better than 'name', because @name carries
meaning, while 'name' could be anything.
Currently, @name is merely shorthand for ``name``, which is an reST
"inline literal", commonly used for short code snippets. Rendered in
fixed-width font, unlike 'name'.
Making @name generating a link to the description would be a nice
improvement.
For non-local members, we can't make @name a link without also
specifying the thing it's a member of.
Let's stick to @name for member names, even non-local ones, so we get
the same font for all of them.
> +#
> # Features:
> #
> # @deprecated: Member @block-incremental is deprecated. Use
> @@ -911,7 +914,8 @@
> 'block-bitmap-mapping',
> { 'name': 'x-vcpu-dirty-limit-period', 'features': ['unstable'] },
> 'vcpu-dirty-limit',
> - 'mode'] }
> + 'mode',
> + 'direct-io'] }
>
> ##
> # @MigrateSetParameters:
> @@ -1070,6 +1074,9 @@
> # @mode: Migration mode. See description in @MigMode. Default is 'normal'.
> # (Since 8.2)
> #
> +# @direct-io: Open migration files with O_DIRECT when possible. This
> +# requires that the 'fixed-ram' capability is enabled. (since 9.0)
> +#
> # Features:
> #
> # @deprecated: Member @block-incremental is deprecated. Use
> @@ -1123,7 +1130,8 @@
> '*x-vcpu-dirty-limit-period': { 'type': 'uint64',
> 'features': [ 'unstable' ] },
> '*vcpu-dirty-limit': 'uint64',
> - '*mode': 'MigMode'} }
> + '*mode': 'MigMode',
> + '*direct-io': 'bool' } }
>
> ##
> # @migrate-set-parameters:
> @@ -1298,6 +1306,9 @@
> # @mode: Migration mode. See description in @MigMode. Default is 'normal'.
> # (Since 8.2)
> #
> +# @direct-io: Open migration files with O_DIRECT when possible. This
> +# requires that the 'fixed-ram' capability is enabled. (since 9.0)
> +#
> # Features:
> #
> # @deprecated: Member @block-incremental is deprecated. Use
> @@ -1348,7 +1359,8 @@
> '*x-vcpu-dirty-limit-period': { 'type': 'uint64',
> 'features': [ 'unstable' ] },
> '*vcpu-dirty-limit': 'uint64',
> - '*mode': 'MigMode'} }
> + '*mode': 'MigMode',
> + '*direct-io': 'bool' } }
>
> ##
> # @query-migrate-parameters:
Other than that, QAPI schema
Acked-by: Markus Armbruster <[email protected]>