qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] block/mirror: Fix target backing BDS
@ 2016-05-26 13:40 Max Reitz
  2016-05-26 13:40 ` [Qemu-devel] [PATCH 1/2] " Max Reitz
  2016-05-26 13:40 ` [Qemu-devel] [PATCH 2/2] iotests: Add test for post-mirror backing chains Max Reitz
  0 siblings, 2 replies; 3+ messages in thread
From: Max Reitz @ 2016-05-26 13:40 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, Max Reitz, Kevin Wolf

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

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

end of thread, other threads:[~2016-05-26 13:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-26 13:40 [Qemu-devel] [PATCH 0/2] block/mirror: Fix target backing BDS Max Reitz
2016-05-26 13:40 ` [Qemu-devel] [PATCH 1/2] " Max Reitz
2016-05-26 13:40 ` [Qemu-devel] [PATCH 2/2] iotests: Add test for post-mirror backing chains Max Reitz

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).