qemu/tests
Vladimir Sementsov-Ogievskiy a13de40a05 block: bdrv_inactivate_recurse(): check for permissions and fix crash
We must not inactivate child when parent has write permissions on
it.

Calling .bdrv_inactivate() doesn't help: actually only qcow2 has this
handler and it is used to flush caches, not for permission
manipulations.

So, let's simply check cumulative parent permissions before
inactivating the node.

This commit fixes a crash when we do migration during backup: prior to
the commit nothing prevents all nodes inactivation at migration finish
and following backup write to the target crashes on assertion
"assert(!(bs->open_flags & BDRV_O_INACTIVE));" in
bdrv_co_write_req_prepare().

After the commit, we rely on the fact that copy-before-write filter
keeps write permission on target node to be able to write to it. So
inactivation fails and migration fails as expected.

Corresponding test now passes, so, enable it.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20210911120027.8063-3-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
2021-09-15 15:54:07 +02:00
..
acceptance tests: Remove uses of deprecated raspi2/raspi3 machine names 2021-09-01 11:08:15 +01:00
bench
data tests/data/acpi/virt: Update IORT files for ITS 2021-09-13 21:01:08 +01:00
decode
docker ci: add libusb for windows builds 2021-07-29 11:18:24 +02:00
fp tests/fp: Enable more tests 2021-06-03 14:09:03 -07:00
guest-debug
image-fuzzer
include
keys
migration tests/migration: fix unix socket migration 2021-07-14 14:15:52 +01:00
multiboot
perf/block/qcow2
plugin tests/plugins/syscalls: adhere to new arg-passing scheme 2021-09-02 11:29:34 +01:00
qapi-schema qapi: Fix bogus error for 'if': { 'not': '' } 2021-09-08 15:30:30 +02:00
qemu-iotests block: bdrv_inactivate_recurse(): check for permissions and fix crash 2021-09-15 15:54:07 +02:00
qtest tests/data/acpi/virt: Update IORT files for ITS 2021-09-13 21:01:08 +01:00
rocker
tcg tests/tcg/s390x: Test SIGILL and SIGSEGV handling 2021-09-06 16:23:12 +02:00
tsan
uefi-test-tools
unit tests: Remove uses of deprecated raspi2/raspi3 machine names 2021-09-01 11:08:15 +01:00
vm tests/vm: update openbsd to release 6.9 2021-07-14 14:33:53 +01:00
vmstate-static-checker-data
check-block.sh
dbus-vmstate-daemon.sh
Makefile.include Acceptance tests: do not try to reuse packages from the system 2021-07-13 16:19:41 -04:00
meson.build
requirements.txt acceptance tests: bump Avocado version to 88.1 2021-06-01 16:21:21 -04:00
test-qht-par.c
vhost-user-bridge.c tests/vhost-user-bridge.c: Fix typo in help message 2021-09-04 17:34:05 -04:00