All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Raman Dzehtsiar <raman.dzehtsiar@gmail.com>
Cc: qemu-devel@nongnu.org,  Wen Congyang <wencongyang2@huawei.com>,
	 Hanna Reitz <hreitz@redhat.com>,  Kevin Wolf <kwolf@redhat.com>,
	 Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,
	 John Snow <jsnow@redhat.com>,
	 Xie Changlong <xiechanglong.d@gmail.com>,
	 Eric Blake <eblake@redhat.com>,
	 qemu-block@nongnu.org
Subject: Re: [PATCH v3] blockdev-backup: Add error handling option for copy-before-write jobs
Date: Mon, 14 Apr 2025 07:06:52 +0200	[thread overview]
Message-ID: <87r01v1gcz.fsf@pond.sub.org> (raw)
In-Reply-To: <20250414011817.671328-1-Raman.Dzehtsiar@gmail.com> (Raman Dzehtsiar's message of "Mon, 14 Apr 2025 03:18:17 +0200")

Raman Dzehtsiar <raman.dzehtsiar@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.Dzehtsiar@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	other threads:[~2025-04-14  5:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-14  1:18 [PATCH v3] blockdev-backup: Add error handling option for copy-before-write jobs Raman Dzehtsiar
2025-04-14  5:06 ` Markus Armbruster [this message]
2025-04-14  9:15   ` Raman Dzehtsiar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r01v1gcz.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=raman.dzehtsiar@gmail.com \
    --cc=vsementsov@yandex-team.ru \
    --cc=wencongyang2@huawei.com \
    --cc=xiechanglong.d@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.