Raman Dzehtsiar <raman.dzehts...@gmail.com> writes:

> This patch extends the blockdev-backup QMP command to allow users to specify
> how to behave when IO errors occur during copy-before-write operations.
> Previously, the behavior was fixed and could not be controlled by the user.
>
> The new 'on-cbw-error' option can be set to one of two values:
> - 'break-guest-write': Forwards the IO error to the guest and triggers
>   the on-source-error policy. This preserves snapshot integrity at the
>   expense of guest IO operations.
> - 'break-snapshot': Allows the guest OS to continue running normally,
>   but invalidates the snapshot and aborts related jobs. This prioritizes
>   guest operation over backup consistency.
>
> This enhancement provides more flexibility for backup operations in different
> environments where requirements for guest availability versus backup
> consistency may vary.
>
> The default behavior remains unchanged to maintain backward compatibility.
>
> Signed-off-by: Raman Dzehtsiar <raman.dzehts...@gmail.com>

[...]

> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index b1937780e1..d35326167d 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -1622,6 +1622,9 @@
>  # @discard-source: Discard blocks on source which have already been
>  #     copied to the target.  (Since 9.1)
>  #
> +# @on-cbw-error: optional policy defining behavior on I/O errors in
> +#     copy-before-write jobs; defaults to break-guest-write.  (Since 10.0)
> +#

This will come out like

    • on-cbw-error (OnCbwError, optional) – optional policy defining
      behavior on I/O errors in copy-before-write jobs; defaults to
      break-guest-write.  (Since 10.0)

Scratch "optional", please.

Also, make it 10.1, and keep the member documentation ordered like ...

>  # @x-perf: Performance options.  (Since 6.0)
>  #
>  # Features:
> @@ -1641,6 +1644,7 @@
>              '*compress': 'bool',
>              '*on-source-error': 'BlockdevOnError',
>              '*on-target-error': 'BlockdevOnError',
> +            '*on-cbw-error': 'OnCbwError',
>              '*auto-finalize': 'bool', '*auto-dismiss': 'bool',
>              '*filter-node-name': 'str',
>              '*discard-source': 'bool',

... the actual members.

[...]


Reply via email to