From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
Kevin Wolf <kwolf@redhat.com>
Subject: [Qemu-devel] [PATCH 0/2] block/mirror: Fix target backing BDS
Date: Thu, 26 May 2016 15:40:01 +0200 [thread overview]
Message-ID: <20160526134003.936-1-mreitz@redhat.com> (raw)
bdrv_replace_in_backing_chain() sometimes does what is advertised (if
the new node does not have a backing file yet and if it hasn't been in
the same backing chain already), but this is not what the mirror block
job (the sole user of that function) actually needs. In fact, it only
needs this behavior in 'top' sync mode.
In 'none' sync mode, we need to use the old BDS as the new backing BDS;
in 'full' sync mode, we should not set any backing BDS at all. And if we
need to set a backing BDS, we should always do so, regardless of whether
the new BDS already has one.
Therefore, bdrv_replace_in_backing_chain() should not attempt to find
out which backing BDS is the right one. Instead, we should leave that to
the mirror block job, namely mirror_exit().
Max Reitz (2):
block/mirror: Fix target backing BDS
iotests: Add test for post-mirror backing chains
block.c | 8 --
block/mirror.c | 13 +++
tests/qemu-iotests/155 | 218 +++++++++++++++++++++++++++++++++++++++++++++
tests/qemu-iotests/155.out | 5 ++
tests/qemu-iotests/group | 1 +
5 files changed, 237 insertions(+), 8 deletions(-)
create mode 100755 tests/qemu-iotests/155
create mode 100644 tests/qemu-iotests/155.out
--
2.8.3
next reply other threads:[~2016-05-26 13:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-26 13:40 Max Reitz [this message]
2016-05-26 13:40 ` [Qemu-devel] [PATCH 1/2] block/mirror: Fix target backing BDS Max Reitz
2016-05-26 13:40 ` [Qemu-devel] [PATCH 2/2] iotests: Add test for post-mirror backing chains Max Reitz
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=20160526134003.936-1-mreitz@redhat.com \
--to=mreitz@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).