All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL v2 0/9] Block jobs & NBD patches
@ 2022-06-29  8:15 Vladimir Sementsov-Ogievskiy
  2022-06-29  8:15 ` [PULL v2 3/9] iotests: add copy-before-write: on-cbw-error tests Vladimir Sementsov-Ogievskiy
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2022-06-29  8:15 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, hreitz, vsementsov, peter.maydell

The following changes since commit ad4c7f529a279685da84297773b4ec8080153c2d:

  Merge tag 'pull-semi-20220628' of https://gitlab.com/rth7680/qemu into staging (2022-06-28 10:24:31 +0530)

are available in the Git repository at:

  https://gitlab.com/vsementsov/qemu.git tags/pull-block-2022-06-14-v2

for you to fetch changes up to 1b8f777673985af366de099ad4e41d334b36fb12:

  block: use 'unsigned' for in_flight field on driver state (2022-06-29 10:57:02 +0300)

----------------------------------------------------------------
Block jobs & NBD patches

v2: - add arguments to QEMUMachine constructor in test, to make it work
      on arm in gitlab pipeline
    - use bdrv_inc_in_flight() / bdrv_dec_in_flight() instead of direct
      manipulation with bs->in_flight

- add new options for copy-before-write filter
- new trace points for NBD
- prefer unsigned type for some 'in_flight' fields

Denis V. Lunev (2):
  nbd: trace long NBD operations
  block: use 'unsigned' for in_flight field on driver state

Vladimir Sementsov-Ogievskiy (7):
  block/copy-before-write: refactor option parsing
  block/copy-before-write: add on-cbw-error open parameter
  iotests: add copy-before-write: on-cbw-error tests
  util: add qemu-co-timeout
  block/block-copy: block_copy(): add timeout_ns parameter
  block/copy-before-write: implement cbw-timeout option
  iotests: copy-before-write: add cases for cbw-timeout option

 block/block-copy.c                            |  33 ++-
 block/copy-before-write.c                     | 110 ++++++---
 block/mirror.c                                |   2 +-
 block/nbd.c                                   |   8 +-
 block/trace-events                            |   2 +
 include/block/block-copy.h                    |   4 +-
 include/qemu/coroutine.h                      |  13 ++
 nbd/client-connection.c                       |   2 +
 nbd/trace-events                              |   3 +
 qapi/block-core.json                          |  31 ++-
 tests/qemu-iotests/pylintrc                   |   5 +
 tests/qemu-iotests/tests/copy-before-write    | 216 ++++++++++++++++++
 .../qemu-iotests/tests/copy-before-write.out  |   5 +
 util/meson.build                              |   1 +
 util/qemu-co-timeout.c                        |  89 ++++++++
 15 files changed, 482 insertions(+), 42 deletions(-)
 create mode 100755 tests/qemu-iotests/tests/copy-before-write
 create mode 100644 tests/qemu-iotests/tests/copy-before-write.out
 create mode 100644 util/qemu-co-timeout.c

-- 
2.25.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PULL v2 3/9] iotests: add copy-before-write: on-cbw-error tests
  2022-06-29  8:15 [PULL v2 0/9] Block jobs & NBD patches Vladimir Sementsov-Ogievskiy
@ 2022-06-29  8:15 ` Vladimir Sementsov-Ogievskiy
  2022-06-29  8:15 ` [PULL v2 6/9] block/copy-before-write: implement cbw-timeout option Vladimir Sementsov-Ogievskiy
  2022-06-29 23:18 ` [PULL v2 0/9] Block jobs & NBD patches Richard Henderson
  2 siblings, 0 replies; 6+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2022-06-29  8:15 UTC (permalink / raw)
  To: qemu-block
  Cc: qemu-devel, hreitz, vsementsov, peter.maydell,
	Vladimir Sementsov-Ogievskiy

From: Vladimir Sementsov-Ogievskiy <vsementsov@openvz.org>

Add tests for new option of copy-before-write filter: on-cbw-error.

Note that we use QEMUMachine instead of VM class, because in further
commit we'll want to use throttling which doesn't work with -accel
qtest used by VM.

We also touch pylintrc to not break iotest 297.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@openvz.org>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
  [vsementsov: add arguments to QEMUMachine constructor]
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
 tests/qemu-iotests/pylintrc                   |   5 +
 tests/qemu-iotests/tests/copy-before-write    | 135 ++++++++++++++++++
 .../qemu-iotests/tests/copy-before-write.out  |   5 +
 3 files changed, 145 insertions(+)
 create mode 100755 tests/qemu-iotests/tests/copy-before-write
 create mode 100644 tests/qemu-iotests/tests/copy-before-write.out

diff --git a/tests/qemu-iotests/pylintrc b/tests/qemu-iotests/pylintrc
index 32ab77b8bb..f4f823a991 100644
--- a/tests/qemu-iotests/pylintrc
+++ b/tests/qemu-iotests/pylintrc
@@ -51,3 +51,8 @@ notes=FIXME,
 
 # Maximum number of characters on a single line.
 max-line-length=79
+
+
+[SIMILARITIES]
+
+min-similarity-lines=6
diff --git a/tests/qemu-iotests/tests/copy-before-write b/tests/qemu-iotests/tests/copy-before-write
new file mode 100755
index 0000000000..e6559de279
--- /dev/null
+++ b/tests/qemu-iotests/tests/copy-before-write
@@ -0,0 +1,135 @@
+#!/usr/bin/env python3
+# group: auto backup
+#
+# Copyright (c) 2022 Virtuozzo International GmbH
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+import os
+import re
+
+from qemu.machine import QEMUMachine
+
+import iotests
+from iotests import qemu_img_create, qemu_io
+
+
+temp_img = os.path.join(iotests.test_dir, 'temp')
+source_img = os.path.join(iotests.test_dir, 'source')
+size = '1M'
+
+
+class TestCbwError(iotests.QMPTestCase):
+    def tearDown(self):
+        self.vm.shutdown()
+        os.remove(temp_img)
+        os.remove(source_img)
+
+    def setUp(self):
+        qemu_img_create('-f', iotests.imgfmt, source_img, size)
+        qemu_img_create('-f', iotests.imgfmt, temp_img, size)
+        qemu_io('-c', 'write 0 1M', source_img)
+
+        opts = ['-nodefaults', '-display', 'none', '-machine', 'none']
+        self.vm = QEMUMachine(iotests.qemu_prog, opts,
+                              base_temp_dir=iotests.test_dir,
+                              sock_dir=iotests.sock_dir)
+        self.vm.launch()
+
+    def do_cbw_error(self, on_cbw_error):
+        result = self.vm.qmp('blockdev-add', {
+            'node-name': 'cbw',
+            'driver': 'copy-before-write',
+            'on-cbw-error': on_cbw_error,
+            'file': {
+                'driver': iotests.imgfmt,
+                'file': {
+                    'driver': 'file',
+                    'filename': source_img,
+                }
+            },
+            'target': {
+                'driver': iotests.imgfmt,
+                'file': {
+                    'driver': 'blkdebug',
+                    'image': {
+                        'driver': 'file',
+                        'filename': temp_img
+                    },
+                    'inject-error': [
+                        {
+                            'event': 'write_aio',
+                            'errno': 5,
+                            'immediately': False,
+                            'once': True
+                        }
+                    ]
+                }
+            }
+        })
+        self.assert_qmp(result, 'return', {})
+
+        result = self.vm.qmp('blockdev-add', {
+            'node-name': 'access',
+            'driver': 'snapshot-access',
+            'file': 'cbw'
+        })
+        self.assert_qmp(result, 'return', {})
+
+        result = self.vm.qmp('human-monitor-command',
+                             command_line='qemu-io cbw "write 0 1M"')
+        self.assert_qmp(result, 'return', '')
+
+        result = self.vm.qmp('human-monitor-command',
+                             command_line='qemu-io access "read 0 1M"')
+        self.assert_qmp(result, 'return', '')
+
+        self.vm.shutdown()
+        log = self.vm.get_log()
+        log = re.sub(r'^\[I \d+\.\d+\] OPENED\n', '', log)
+        log = re.sub(r'\[I \+\d+\.\d+\] CLOSED\n?$', '', log)
+        log = iotests.filter_qemu_io(log)
+        return log
+
+    def test_break_snapshot_on_cbw_error(self):
+        """break-snapshot behavior:
+        Guest write succeed, but further snapshot-read fails, as snapshot is
+        broken.
+        """
+        log = self.do_cbw_error('break-snapshot')
+
+        self.assertEqual(log, """\
+wrote 1048576/1048576 bytes at offset 0
+1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read failed: Permission denied
+""")
+
+    def test_break_guest_write_on_cbw_error(self):
+        """break-guest-write behavior:
+        Guest write fails, but snapshot-access continues working and further
+        snapshot-read succeeds.
+        """
+        log = self.do_cbw_error('break-guest-write')
+
+        self.assertEqual(log, """\
+write failed: Input/output error
+read 1048576/1048576 bytes at offset 0
+1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+""")
+
+
+if __name__ == '__main__':
+    iotests.main(supported_fmts=['qcow2'],
+                 supported_protocols=['file'])
diff --git a/tests/qemu-iotests/tests/copy-before-write.out b/tests/qemu-iotests/tests/copy-before-write.out
new file mode 100644
index 0000000000..fbc63e62f8
--- /dev/null
+++ b/tests/qemu-iotests/tests/copy-before-write.out
@@ -0,0 +1,5 @@
+..
+----------------------------------------------------------------------
+Ran 2 tests
+
+OK
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PULL v2 6/9] block/copy-before-write: implement cbw-timeout option
  2022-06-29  8:15 [PULL v2 0/9] Block jobs & NBD patches Vladimir Sementsov-Ogievskiy
  2022-06-29  8:15 ` [PULL v2 3/9] iotests: add copy-before-write: on-cbw-error tests Vladimir Sementsov-Ogievskiy
@ 2022-06-29  8:15 ` Vladimir Sementsov-Ogievskiy
  2022-06-29 23:18 ` [PULL v2 0/9] Block jobs & NBD patches Richard Henderson
  2 siblings, 0 replies; 6+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2022-06-29  8:15 UTC (permalink / raw)
  To: qemu-block
  Cc: qemu-devel, hreitz, vsementsov, peter.maydell,
	Vladimir Sementsov-Ogievskiy

From: Vladimir Sementsov-Ogievskiy <vsementsov@openvz.org>

In some scenarios, when copy-before-write operations lasts too long
time, it's better to cancel it.

Most useful would be to use the new option together with
on-cbw-error=break-snapshot: this way if cbw operation takes too long
time we'll just cancel backup process but do not disturb the guest too
much.

Note the tricky point of realization: we keep additional point in
bs->in_flight during block_copy operation even if it's timed-out.
Background "cancelled" block_copy operations will finish at some point
and will want to access state. We should care to not free the state in
.bdrv_close() earlier.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@openvz.org>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
  [vsementsov: use bdrv_inc_in_flight()/bdrv_dec_in_flight() instead of
   direct manipulation on bs->in_flight]
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
 block/copy-before-write.c | 22 +++++++++++++++++++++-
 qapi/block-core.json      |  8 +++++++-
 2 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/block/copy-before-write.c b/block/copy-before-write.c
index fc13c7cd44..c24b8dd117 100644
--- a/block/copy-before-write.c
+++ b/block/copy-before-write.c
@@ -42,6 +42,7 @@ typedef struct BDRVCopyBeforeWriteState {
     BlockCopyState *bcs;
     BdrvChild *target;
     OnCbwError on_cbw_error;
+    uint32_t cbw_timeout_ns;
 
     /*
      * @lock: protects access to @access_bitmap, @done_bitmap and
@@ -83,6 +84,13 @@ static coroutine_fn int cbw_co_preadv(
     return bdrv_co_preadv(bs->file, offset, bytes, qiov, flags);
 }
 
+static void block_copy_cb(void *opaque)
+{
+    BlockDriverState *bs = opaque;
+
+    bdrv_dec_in_flight(bs);
+}
+
 /*
  * Do copy-before-write operation.
  *
@@ -111,7 +119,16 @@ static coroutine_fn int cbw_do_copy_before_write(BlockDriverState *bs,
     off = QEMU_ALIGN_DOWN(offset, cluster_size);
     end = QEMU_ALIGN_UP(offset + bytes, cluster_size);
 
-    ret = block_copy(s->bcs, off, end - off, true, 0, NULL, NULL);
+    /*
+     * Increase in_flight, so that in case of timed-out block-copy, the
+     * remaining background block_copy() request (which can't be immediately
+     * cancelled by timeout) is presented in bs->in_flight. This way we are
+     * sure that on bs close() we'll previously wait for all timed-out but yet
+     * running block_copy calls.
+     */
+    bdrv_inc_in_flight(bs);
+    ret = block_copy(s->bcs, off, end - off, true, s->cbw_timeout_ns,
+                     block_copy_cb, bs);
     if (ret < 0 && s->on_cbw_error == ON_CBW_ERROR_BREAK_GUEST_WRITE) {
         return ret;
     }
@@ -377,6 +394,7 @@ static BlockdevOptions *cbw_parse_options(QDict *options, Error **errp)
      */
     qdict_extract_subqdict(options, NULL, "bitmap");
     qdict_del(options, "on-cbw-error");
+    qdict_del(options, "cbw-timeout");
 
 out:
     visit_free(v);
@@ -423,6 +441,8 @@ static int cbw_open(BlockDriverState *bs, QDict *options, int flags,
     }
     s->on_cbw_error = opts->has_on_cbw_error ? opts->on_cbw_error :
             ON_CBW_ERROR_BREAK_GUEST_WRITE;
+    s->cbw_timeout_ns = opts->has_cbw_timeout ?
+        opts->cbw_timeout * NANOSECONDS_PER_SECOND : 0;
 
     bs->total_sectors = bs->file->bs->total_sectors;
     bs->supported_write_flags = BDRV_REQ_WRITE_UNCHANGED |
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 3e8456a94a..2173e7734a 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -4227,12 +4227,18 @@
 # @on-cbw-error: Behavior on failure of copy-before-write operation.
 #                Default is @break-guest-write. (Since 7.1)
 #
+# @cbw-timeout: Zero means no limit. Non-zero sets the timeout in seconds
+#               for copy-before-write operation. When a timeout occurs,
+#               the respective copy-before-write operation will fail, and
+#               the @on-cbw-error parameter will decide how this failure
+#               is handled. Default 0. (Since 7.1)
+#
 # Since: 6.2
 ##
 { 'struct': 'BlockdevOptionsCbw',
   'base': 'BlockdevOptionsGenericFormat',
   'data': { 'target': 'BlockdevRef', '*bitmap': 'BlockDirtyBitmap',
-            '*on-cbw-error': 'OnCbwError' } }
+            '*on-cbw-error': 'OnCbwError', '*cbw-timeout': 'uint32' } }
 
 ##
 # @BlockdevOptions:
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PULL v2 0/9] Block jobs & NBD patches
  2022-06-29  8:15 [PULL v2 0/9] Block jobs & NBD patches Vladimir Sementsov-Ogievskiy
  2022-06-29  8:15 ` [PULL v2 3/9] iotests: add copy-before-write: on-cbw-error tests Vladimir Sementsov-Ogievskiy
  2022-06-29  8:15 ` [PULL v2 6/9] block/copy-before-write: implement cbw-timeout option Vladimir Sementsov-Ogievskiy
@ 2022-06-29 23:18 ` Richard Henderson
  2022-07-01 17:02   ` John Snow
  2 siblings, 1 reply; 6+ messages in thread
From: Richard Henderson @ 2022-06-29 23:18 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy, qemu-block
  Cc: qemu-devel, hreitz, peter.maydell

On 6/29/22 13:45, Vladimir Sementsov-Ogievskiy wrote:
> The following changes since commit ad4c7f529a279685da84297773b4ec8080153c2d:
> 
>    Merge tag 'pull-semi-20220628' of https://gitlab.com/rth7680/qemu into staging (2022-06-28 10:24:31 +0530)
> 
> are available in the Git repository at:
> 
>    https://gitlab.com/vsementsov/qemu.git tags/pull-block-2022-06-14-v2
> 
> for you to fetch changes up to 1b8f777673985af366de099ad4e41d334b36fb12:
> 
>    block: use 'unsigned' for in_flight field on driver state (2022-06-29 10:57:02 +0300)
> 
> ----------------------------------------------------------------
> Block jobs & NBD patches
> 
> v2: - add arguments to QEMUMachine constructor in test, to make it work
>        on arm in gitlab pipeline
>      - use bdrv_inc_in_flight() / bdrv_dec_in_flight() instead of direct
>        manipulation with bs->in_flight

Applied, thanks.  Please update https://wiki.qemu.org/ChangeLog/7.1 as appropriate.


r~


> 
> - add new options for copy-before-write filter
> - new trace points for NBD
> - prefer unsigned type for some 'in_flight' fields
> 
> Denis V. Lunev (2):
>    nbd: trace long NBD operations
>    block: use 'unsigned' for in_flight field on driver state
> 
> Vladimir Sementsov-Ogievskiy (7):
>    block/copy-before-write: refactor option parsing
>    block/copy-before-write: add on-cbw-error open parameter
>    iotests: add copy-before-write: on-cbw-error tests
>    util: add qemu-co-timeout
>    block/block-copy: block_copy(): add timeout_ns parameter
>    block/copy-before-write: implement cbw-timeout option
>    iotests: copy-before-write: add cases for cbw-timeout option
> 
>   block/block-copy.c                            |  33 ++-
>   block/copy-before-write.c                     | 110 ++++++---
>   block/mirror.c                                |   2 +-
>   block/nbd.c                                   |   8 +-
>   block/trace-events                            |   2 +
>   include/block/block-copy.h                    |   4 +-
>   include/qemu/coroutine.h                      |  13 ++
>   nbd/client-connection.c                       |   2 +
>   nbd/trace-events                              |   3 +
>   qapi/block-core.json                          |  31 ++-
>   tests/qemu-iotests/pylintrc                   |   5 +
>   tests/qemu-iotests/tests/copy-before-write    | 216 ++++++++++++++++++
>   .../qemu-iotests/tests/copy-before-write.out  |   5 +
>   util/meson.build                              |   1 +
>   util/qemu-co-timeout.c                        |  89 ++++++++
>   15 files changed, 482 insertions(+), 42 deletions(-)
>   create mode 100755 tests/qemu-iotests/tests/copy-before-write
>   create mode 100644 tests/qemu-iotests/tests/copy-before-write.out
>   create mode 100644 util/qemu-co-timeout.c
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PULL v2 0/9] Block jobs & NBD patches
  2022-06-29 23:18 ` [PULL v2 0/9] Block jobs & NBD patches Richard Henderson
@ 2022-07-01 17:02   ` John Snow
  2022-07-04 15:10     ` Vladimir Sementsov-Ogievskiy
  0 siblings, 1 reply; 6+ messages in thread
From: John Snow @ 2022-07-01 17:02 UTC (permalink / raw)
  To: Richard Henderson
  Cc: Vladimir Sementsov-Ogievskiy, Qemu-block, qemu-devel,
	Hanna Reitz, Peter Maydell

On Wed, Jun 29, 2022 at 7:18 PM Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 6/29/22 13:45, Vladimir Sementsov-Ogievskiy wrote:
> > The following changes since commit ad4c7f529a279685da84297773b4ec8080153c2d:
> >
> >    Merge tag 'pull-semi-20220628' of https://gitlab.com/rth7680/qemu into staging (2022-06-28 10:24:31 +0530)
> >
> > are available in the Git repository at:
> >
> >    https://gitlab.com/vsementsov/qemu.git tags/pull-block-2022-06-14-v2
> >
> > for you to fetch changes up to 1b8f777673985af366de099ad4e41d334b36fb12:
> >
> >    block: use 'unsigned' for in_flight field on driver state (2022-06-29 10:57:02 +0300)
> >
> > ----------------------------------------------------------------
> > Block jobs & NBD patches
> >
> > v2: - add arguments to QEMUMachine constructor in test, to make it work
> >        on arm in gitlab pipeline
> >      - use bdrv_inc_in_flight() / bdrv_dec_in_flight() instead of direct
> >        manipulation with bs->in_flight
>
> Applied, thanks.  Please update https://wiki.qemu.org/ChangeLog/7.1 as appropriate.
>
>
> r~
>
>
> >
> > - add new options for copy-before-write filter
> > - new trace points for NBD
> > - prefer unsigned type for some 'in_flight' fields
> >
> > Denis V. Lunev (2):
> >    nbd: trace long NBD operations
> >    block: use 'unsigned' for in_flight field on driver state
> >
> > Vladimir Sementsov-Ogievskiy (7):
> >    block/copy-before-write: refactor option parsing
> >    block/copy-before-write: add on-cbw-error open parameter
> >    iotests: add copy-before-write: on-cbw-error tests
> >    util: add qemu-co-timeout
> >    block/block-copy: block_copy(): add timeout_ns parameter
> >    block/copy-before-write: implement cbw-timeout option
> >    iotests: copy-before-write: add cases for cbw-timeout option
> >
> >   block/block-copy.c                            |  33 ++-
> >   block/copy-before-write.c                     | 110 ++++++---
> >   block/mirror.c                                |   2 +-
> >   block/nbd.c                                   |   8 +-
> >   block/trace-events                            |   2 +
> >   include/block/block-copy.h                    |   4 +-
> >   include/qemu/coroutine.h                      |  13 ++
> >   nbd/client-connection.c                       |   2 +
> >   nbd/trace-events                              |   3 +
> >   qapi/block-core.json                          |  31 ++-
> >   tests/qemu-iotests/pylintrc                   |   5 +
> >   tests/qemu-iotests/tests/copy-before-write    | 216 ++++++++++++++++++
> >   .../qemu-iotests/tests/copy-before-write.out  |   5 +
> >   util/meson.build                              |   1 +
> >   util/qemu-co-timeout.c                        |  89 ++++++++
> >   15 files changed, 482 insertions(+), 42 deletions(-)
> >   create mode 100755 tests/qemu-iotests/tests/copy-before-write
> >   create mode 100644 tests/qemu-iotests/tests/copy-before-write.out
> >   create mode 100644 util/qemu-co-timeout.c
> >
>
>

iotests: copy-before-write: add cases for cbw-timeout option

- This is causing the FreeBSD VM tests to regress for me, because the
new iotest is failing there. Haven't diagnosed further yet, but I will
update this thread if I get better info.

--js



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PULL v2 0/9] Block jobs & NBD patches
  2022-07-01 17:02   ` John Snow
@ 2022-07-04 15:10     ` Vladimir Sementsov-Ogievskiy
  0 siblings, 0 replies; 6+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2022-07-04 15:10 UTC (permalink / raw)
  To: John Snow, Richard Henderson
  Cc: Qemu-block, qemu-devel, Hanna Reitz, Peter Maydell

On 7/1/22 20:02, John Snow wrote:
> On Wed, Jun 29, 2022 at 7:18 PM Richard Henderson
> <richard.henderson@linaro.org> wrote:
>>
>> On 6/29/22 13:45, Vladimir Sementsov-Ogievskiy wrote:
>>> The following changes since commit ad4c7f529a279685da84297773b4ec8080153c2d:
>>>
>>>     Merge tag 'pull-semi-20220628' of https://gitlab.com/rth7680/qemu into staging (2022-06-28 10:24:31 +0530)
>>>
>>> are available in the Git repository at:
>>>
>>>     https://gitlab.com/vsementsov/qemu.git tags/pull-block-2022-06-14-v2
>>>
>>> for you to fetch changes up to 1b8f777673985af366de099ad4e41d334b36fb12:
>>>
>>>     block: use 'unsigned' for in_flight field on driver state (2022-06-29 10:57:02 +0300)
>>>
>>> ----------------------------------------------------------------
>>> Block jobs & NBD patches
>>>
>>> v2: - add arguments to QEMUMachine constructor in test, to make it work
>>>         on arm in gitlab pipeline
>>>       - use bdrv_inc_in_flight() / bdrv_dec_in_flight() instead of direct
>>>         manipulation with bs->in_flight
>>
>> Applied, thanks.  Please update https://wiki.qemu.org/ChangeLog/7.1 as appropriate.
>>
>>
>> r~
>>
>>
>>>
>>> - add new options for copy-before-write filter
>>> - new trace points for NBD
>>> - prefer unsigned type for some 'in_flight' fields
>>>
>>> Denis V. Lunev (2):
>>>     nbd: trace long NBD operations
>>>     block: use 'unsigned' for in_flight field on driver state
>>>
>>> Vladimir Sementsov-Ogievskiy (7):
>>>     block/copy-before-write: refactor option parsing
>>>     block/copy-before-write: add on-cbw-error open parameter
>>>     iotests: add copy-before-write: on-cbw-error tests
>>>     util: add qemu-co-timeout
>>>     block/block-copy: block_copy(): add timeout_ns parameter
>>>     block/copy-before-write: implement cbw-timeout option
>>>     iotests: copy-before-write: add cases for cbw-timeout option
>>>
>>>    block/block-copy.c                            |  33 ++-
>>>    block/copy-before-write.c                     | 110 ++++++---
>>>    block/mirror.c                                |   2 +-
>>>    block/nbd.c                                   |   8 +-
>>>    block/trace-events                            |   2 +
>>>    include/block/block-copy.h                    |   4 +-
>>>    include/qemu/coroutine.h                      |  13 ++
>>>    nbd/client-connection.c                       |   2 +
>>>    nbd/trace-events                              |   3 +
>>>    qapi/block-core.json                          |  31 ++-
>>>    tests/qemu-iotests/pylintrc                   |   5 +
>>>    tests/qemu-iotests/tests/copy-before-write    | 216 ++++++++++++++++++
>>>    .../qemu-iotests/tests/copy-before-write.out  |   5 +
>>>    util/meson.build                              |   1 +
>>>    util/qemu-co-timeout.c                        |  89 ++++++++
>>>    15 files changed, 482 insertions(+), 42 deletions(-)
>>>    create mode 100755 tests/qemu-iotests/tests/copy-before-write
>>>    create mode 100644 tests/qemu-iotests/tests/copy-before-write.out
>>>    create mode 100644 util/qemu-co-timeout.c
>>>
>>
>>
> 
> iotests: copy-before-write: add cases for cbw-timeout option
> 
> - This is causing the FreeBSD VM tests to regress for me, because the
> new iotest is failing there. Haven't diagnosed further yet, but I will
> update this thread if I get better info.
> 

Like other problems around this test (I had a hard debugging session for the problem that reproduces only on gitlab pipline :/, it may relate to the fact that I use QEMUMachine class directly and avoid -accel qtest. Also, to fix test on ARM, I've added -machine none.


-- 
Best regards,
Vladimir


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-07-04 15:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-29  8:15 [PULL v2 0/9] Block jobs & NBD patches Vladimir Sementsov-Ogievskiy
2022-06-29  8:15 ` [PULL v2 3/9] iotests: add copy-before-write: on-cbw-error tests Vladimir Sementsov-Ogievskiy
2022-06-29  8:15 ` [PULL v2 6/9] block/copy-before-write: implement cbw-timeout option Vladimir Sementsov-Ogievskiy
2022-06-29 23:18 ` [PULL v2 0/9] Block jobs & NBD patches Richard Henderson
2022-07-01 17:02   ` John Snow
2022-07-04 15:10     ` Vladimir Sementsov-Ogievskiy

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.