qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 0/5] block: Add BDS.never_freeze


From: Max Reitz
Subject: [Qemu-devel] [PATCH 0/5] block: Add BDS.never_freeze
Date: Fri, 28 Jun 2019 00:32:50 +0200

As it is, this series depends on my block branch, most importantly
Andrey’s series “block/stream: get rid of the base”.

Depends-on: <address@hidden>

This series made the problem apparent to me, but it existed before:
Namely, the commit and mirror block jobs create filter nodes which they
just try to drop with an &error_fatal.  If any of its parent links is
frozen, that will abort qemu.  Patch 1 fixes this by adding a
BDS.never_freeze flag, which prevents bdrv_freeze_backing_chain() from
freezing any links to a BDS that has this flag set.

Now, after Andrey’s series, you can reproduce this problem by first
launching a commit job and then launching a stream job from the commit’s
top node.  This is actually something that iotest 030 tests, but I
didn’t notice the problem because 030 has two problems of itself:
(1) It fails to do proper throttling, so usually, the commit job is
    already gone by the time the stream job starts.  (Fixed by patch 2.)
(2) It doesn’t check the error message, but just the error class.  If it
    had checked the error message, we would have seen that it just says
    that the stream’s base node cannot be found, and thus would have
    fixed problem #1 earlier.  (Fixed by patch 3.)

If you apply patches 2 and 3 to my block branch, you’ll see that both
jobs can be created.  If you remove the check that creating the stream
job should fail and replace the self.wait_until_completed() by a
self.vm.run_job('drive0'), you will see that qemu aborts.

So that appears to be a new problem introduced by Andrey’s series,
right?  But it actually isn’t new.  Patch 5 adds a test for a
pre-existing case:

If on master you launch a commit job and then a stream job from the
commit’s filter node, qemu will abort (if the commit job completes
before the stream job, at least).  So the problem existed well before
Andrey’s series, it just moved it down one node.
(You can test that by applying patches 2 through 5 on master.  You will
get a failure in test_overlapping_4, and a qemu abort in
test_overlapping_5.)

In turn, thanks to said series, this test case now fully works.  (So you
can stream from a commit’s filter node.)


So either way, the problem addressed by patch 1 is visible both on
master and on my block branch.  It just appears in different places,
hence the dependency.


Max Reitz (5):
  block: Add BDS.never_freeze
  iotests: Fix throttling in 030
  iotests: Compare error messages in 030
  iotests: Add @use_log to VM.run_job()
  iotests: Add new case to 030

 include/block/block_int.h     |   3 +
 block.c                       |   8 +++
 block/commit.c                |   4 ++
 block/mirror.c                |   4 ++
 tests/qemu-iotests/030        | 121 ++++++++++++++++++++++++++--------
 tests/qemu-iotests/030.out    |   4 +-
 tests/qemu-iotests/iotests.py |  18 +++--
 7 files changed, 127 insertions(+), 35 deletions(-)

-- 
2.21.0




reply via email to

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