summary refs log tree commit diff stats
path: root/hw/misc/hyperv_testdev.c
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2017-01-31 14:23:08 +0300
committerMax Reitz <mreitz@redhat.com>2017-02-12 00:47:42 +0100
commit16e977d506bcc2d9f7daa4a9f7cc2b48536d9da6 (patch)
treea88950216643f04996dd9d8735ed6bb2069a1d5e /hw/misc/hyperv_testdev.c
parenta6baa60807f88ba7d97b1787797fb58882ccbfb9 (diff)
downloadfocaccia-qemu-16e977d506bcc2d9f7daa4a9f7cc2b48536d9da6.tar.gz
focaccia-qemu-16e977d506bcc2d9f7daa4a9f7cc2b48536d9da6.zip
block: bdrv_invalidate_cache: invalidate children first
Current implementation invalidates firstly parent bds and then its
children. This leads to the following bug:

after incoming migration, in bdrv_invalidate_cache_all:
1. invalidate parent bds - reopen it with BDRV_O_INACTIVE cleared
2. child is not yet invalidated
3. parent check that its BDRV_O_INACTIVE is cleared
4. parent writes to child
5. assert in bdrv_co_pwritev, as BDRV_O_INACTIVE is set for child

This patch fixes it by just changing invalidate sequence: invalidate
children first.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-id: 20170131112308.54189-1-vsementsov@virtuozzo.com
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'hw/misc/hyperv_testdev.c')
0 files changed, 0 insertions, 0 deletions