From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Alberto Garcia <berto@igalia.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>,
John Snow <jsnow@redhat.com>
Subject: [Qemu-devel] [PATCH 0/5] block: Add BDS.never_freeze
Date: Fri, 28 Jun 2019 00:32:50 +0200 [thread overview]
Message-ID: <20190627223255.3789-1-mreitz@redhat.com> (raw)
As it is, this series depends on my block branch, most importantly
Andrey’s series “block/stream: get rid of the base”.
Depends-on: <1559152576-281803-1-git-send-email-andrey.shinkevich@virtuozzo.com>
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
next reply other threads:[~2019-06-27 22:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-27 22:32 Max Reitz [this message]
2019-06-27 22:32 ` [Qemu-devel] [PATCH 1/5] block: Add BDS.never_freeze Max Reitz
2019-07-01 16:46 ` Andrey Shinkevich
2019-07-02 14:02 ` Alberto Garcia
2019-07-02 15:28 ` Max Reitz
2019-07-02 15:36 ` Alberto Garcia
2019-07-02 15:38 ` Max Reitz
2019-06-27 22:32 ` [Qemu-devel] [PATCH 2/5] iotests: Fix throttling in 030 Max Reitz
2019-07-01 16:41 ` Andrey Shinkevich
2019-07-02 15:09 ` Alberto Garcia
2019-06-27 22:32 ` [Qemu-devel] [PATCH 3/5] iotests: Compare error messages " Max Reitz
2019-07-01 16:42 ` Andrey Shinkevich
2019-07-02 12:37 ` Alberto Garcia
2019-06-27 22:32 ` [Qemu-devel] [PATCH 4/5] iotests: Add @use_log to VM.run_job() Max Reitz
2019-07-01 22:59 ` John Snow
2019-07-02 16:19 ` Max Reitz
2019-07-02 20:21 ` John Snow
2019-06-27 22:32 ` [Qemu-devel] [PATCH 5/5] iotests: Add new case to 030 Max Reitz
2019-07-01 16:44 ` Andrey Shinkevich
2019-07-02 14:59 ` Alberto Garcia
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=20190627223255.3789-1-mreitz@redhat.com \
--to=mreitz@redhat.com \
--cc=andrey.shinkevich@virtuozzo.com \
--cc=berto@igalia.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).