[Qemu-devel] [PATCH for-2.10 v2 0/4] block: Fix non-shared storage migration

Fam Zheng posted 4 patches 6 years, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170815130740.31229-1-famz@redhat.com
Test FreeBSD passed
Test checkpatch passed
Test docker passed
Test s390x passed
block/block-backend.c        | 41 ++++++++++++++++++++++++++++
nbd/server.c                 | 20 +++++++-------
stubs/Makefile.objs          |  1 +
stubs/change-state-handler.c | 14 ++++++++++
tests/qemu-iotests/192       | 63 ++++++++++++++++++++++++++++++++++++++++++++
tests/qemu-iotests/192.out   |  7 +++++
tests/qemu-iotests/group     |  1 +
7 files changed, 138 insertions(+), 9 deletions(-)
create mode 100644 stubs/change-state-handler.c
create mode 100755 tests/qemu-iotests/192
create mode 100644 tests/qemu-iotests/192.out
[Qemu-devel] [PATCH for-2.10 v2 0/4] block: Fix non-shared storage migration
Posted by Fam Zheng 6 years, 8 months ago
v2: Don't leak blk->vmsh when BB is deleted before the callback is called.
    [Stefan]
    From stub functions, don't return g_malloc0(1) which is risky, return NULL.
    [Eric]

"nbd-server-add -w" doesn't work when we are in "-incoming defer" state:

    (qemu) nbd_server_add -w drive-virtio-disk0
    Block node is read-only

Two problems are faced:

  - nbd_export_new() calls bdrv_invalidate_cache() too late.
  - bdrv_invalidate_cache() restores qdev permission (which are temporarily
    masked by BlockBackend.disable_perm during INMIGRATE) too early.

Fix both, and add a regression iotest.

Fam Zheng (3):
  stubs: Add vm state change handler stubs
  block-backend: Defer shared_perm tightening migration completion
  iotests: Add non-shared storage migration case 192

Kevin Wolf (1):
  nbd: Fix order of bdrv_set_perm and bdrv_invalidate_cache

 block/block-backend.c        | 41 ++++++++++++++++++++++++++++
 nbd/server.c                 | 20 +++++++-------
 stubs/Makefile.objs          |  1 +
 stubs/change-state-handler.c | 14 ++++++++++
 tests/qemu-iotests/192       | 63 ++++++++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/192.out   |  7 +++++
 tests/qemu-iotests/group     |  1 +
 7 files changed, 138 insertions(+), 9 deletions(-)
 create mode 100644 stubs/change-state-handler.c
 create mode 100755 tests/qemu-iotests/192
 create mode 100644 tests/qemu-iotests/192.out

-- 
2.13.4


Re: [Qemu-devel] [PATCH for-2.10 v2 0/4] block: Fix non-shared storage migration
Posted by Christian Ehrhardt 6 years, 8 months ago
On Tue, Aug 15, 2017 at 3:07 PM, Fam Zheng <famz@redhat.com> wrote:

> v2: Don't leak blk->vmsh when BB is deleted before the callback is called.
>     [Stefan]
>     From stub functions, don't return g_malloc0(1) which is risky, return
> NULL.
>     [Eric]


Thanks Fam Zheng and Kevin Wolf,
retesting on -rc3 clearly got me further.

Unfortunately the overall test of a libvirt controlled migration with
--copy-storage-all or --copy-storage-inc still does not work.
I have no good pointers yet where to look at, but wanted to give a heads up.

I'm tracking what I have in [1] so far and added upstream qemu as bug task
as well until we know better.

[1]: https://bugs.launchpad.net/qemu/+bug/1711602