qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 2/7] block/copy-before-write: add on-cbw-error open parame


From: Hanna Reitz
Subject: Re: [PATCH v3 2/7] block/copy-before-write: add on-cbw-error open parameter
Date: Thu, 7 Apr 2022 10:22:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

On 06.04.22 20:07, Vladimir Sementsov-Ogievskiy wrote:
Currently, behavior on copy-before-write operation failure is simple:
report error to the guest.

Let's implement alternative behavior: break the whole copy-before-write
process (and corresponding backup job or NBD client) but keep guest
working. It's needed if we consider guest stability as more important.

The realisation is simple: on copy-before-write failure we set
s->snapshot_ret and continue guest operations. s->snapshot_ret being
set will lead to all further snapshot API requests. Note that all
in-flight snapshot-API requests may still success: we do wait for them
on BREAK_SNAPSHOT-failure path in cbw_do_copy_before_write().

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@openvz.org>
---
  qapi/block-core.json      | 25 ++++++++++++++++++++++++-
  block/copy-before-write.c | 32 ++++++++++++++++++++++++++++++--
  2 files changed, 54 insertions(+), 3 deletions(-)

diff --git a/qapi/block-core.json b/qapi/block-core.json
index beeb91952a..085f1666af 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json

[...]

@@ -4184,11 +4203,15 @@
  #          modifications (or removing) of specified bitmap doesn't
  #          influence the filter. (Since 7.0)
  #
+# @on-cbw-error: Behavior on failure of copy-before-write operation.
+#                Default is @break-guest-write. (Since 7.0)

With *7.1:

Reviewed-by: Hanna Reitz <hreitz@redhat.com>

+#
  # Since: 6.2
  ##
  { 'struct': 'BlockdevOptionsCbw',
    'base': 'BlockdevOptionsGenericFormat',
-  'data': { 'target': 'BlockdevRef', '*bitmap': 'BlockDirtyBitmap' } }
+  'data': { 'target': 'BlockdevRef', '*bitmap': 'BlockDirtyBitmap',
+            '*on-cbw-error': 'OnCbwError' } }
##
  # @BlockdevOptions:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]