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>, Fam Zheng <famz@redhat.com>
Subject: [Qemu-devel] [PATCH v3 0/5] block/mirror: Fix (?) target backing BDS
Date: Fri, 10 Jun 2016 20:57:45 +0200 [thread overview]
Message-ID: <20160610185750.30956-1-mreitz@redhat.com> (raw)
Issue #1: If the target image does not have a backing BDS before mirror
completion, qemu tries really hard to give it a backing BDS. If the
source has a backing BDS, it will actually always "succeed".
In some cases, the target is not supposed to have a backing BDS, though
(absolute-paths: because of sync=full; existing: because the target
image does not have a backing file; blockdev-mirror: because of an
explicit "backing": ""). Then, this is pretty bad behavior.
This should generally not change the target's visible data, but it still
is ugly.
Issue #2: Currently the backing chain of the target is basically opened
using bdrv_open_backing_file() (except for sometimes™). This results in
multiple BDSs for a single physical file, which is bad. In most use
cases, this is only temporary, but it still is bad.
If we can reuse the existing backing chain of the source (which is with
drive-mirror in "absolute-paths" mode), we should just do so.
v3:
- Patch 1:
- More verbose commit message [Kevin]
- Changed comment to match code [Kevin]
- Patch 2:
- Do not force use of the source backing chain for the target in
"existing" mode or with blockdev-mirror [Kevin]
- Instead keep doing what we've been doing for
drive-mirror/existing, only that we should still drop the
bdrv_set_backing_hd() in bdrv_replace_in_backing_chain()
- And for blockdev-mirror, just do not change the current backing
chain at all; this is what we've been doing until now, unless the
target BDS did not have a backing BDS yet
- Patch 3: Added, because it makes the next test a bit nicer
- Patch 4: Adjusted to v3 behavior, and added a new test for
blockdev-mirror with a target whose backing file has been overridden
using the "backing" option
- Patch 5: Added [Kevin]
git-backport-diff against v2:
Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively
001/5:[0005] [FC] 'block: Allow replacement of a BDS by its overlay'
002/5:[0057] [FC] 'block/mirror: Fix target backing BDS'
003/5:[down] 'block/null: Implement bdrv_refresh_filename()'
004/5:[0073] [FC] 'iotests: Add test for post-mirror backing chains'
005/5:[down] 'iotests: Add test for oVirt-like storage migration'
Max Reitz (5):
block: Allow replacement of a BDS by its overlay
block/mirror: Fix target backing BDS
block/null: Implement bdrv_refresh_filename()
iotests: Add test for post-mirror backing chains
iotests: Add test for oVirt-like storage migration
block.c | 24 +++--
block/mirror.c | 39 +++++--
block/null.c | 20 ++++
blockdev.c | 15 ++-
include/block/block_int.h | 18 +++-
tests/qemu-iotests/155 | 263 +++++++++++++++++++++++++++++++++++++++++++++
tests/qemu-iotests/155.out | 5 +
tests/qemu-iotests/156 | 174 ++++++++++++++++++++++++++++++
tests/qemu-iotests/156.out | 48 +++++++++
tests/qemu-iotests/group | 2 +
10 files changed, 584 insertions(+), 24 deletions(-)
create mode 100755 tests/qemu-iotests/155
create mode 100644 tests/qemu-iotests/155.out
create mode 100755 tests/qemu-iotests/156
create mode 100644 tests/qemu-iotests/156.out
--
2.8.3
next reply other threads:[~2016-06-10 18:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-10 18:57 Max Reitz [this message]
2016-06-10 18:57 ` [Qemu-devel] [PATCH v3 1/5] block: Allow replacement of a BDS by its overlay Max Reitz
2016-06-12 3:15 ` Fam Zheng
2016-06-13 15:13 ` Kevin Wolf
2016-06-10 18:57 ` [Qemu-devel] [PATCH v3 2/5] block/mirror: Fix target backing BDS Max Reitz
2016-06-10 18:57 ` [Qemu-devel] [PATCH v3 3/5] block/null: Implement bdrv_refresh_filename() Max Reitz
2016-06-12 4:08 ` Fam Zheng
2016-06-14 12:59 ` Max Reitz
2016-06-10 18:57 ` [Qemu-devel] [PATCH v3 4/5] iotests: Add test for post-mirror backing chains Max Reitz
2016-06-12 4:17 ` Fam Zheng
2016-06-14 13:01 ` Max Reitz
2016-06-10 18:57 ` [Qemu-devel] [PATCH v3 5/5] iotests: Add test for oVirt-like storage migration Max Reitz
2016-06-12 4:23 ` [Qemu-devel] [PATCH v3 0/5] block/mirror: Fix (?) target backing BDS Fam Zheng
2016-06-13 15:16 ` Kevin Wolf
2016-06-14 15:53 ` 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=20160610185750.30956-1-mreitz@redhat.com \
--to=mreitz@redhat.com \
--cc=famz@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).