qemu-patch-raspberry4/include
Jeff Cody f8aa905a4f block: set device_list.tqe_prev to NULL on BDS removal
This fixes a regression introduced with commit 3f09bfbc7.  Multiple
bugs arise in conjunction with live snapshots and mirroring operations
(which include active layer commit).

After a live snapshot occurs, the active layer and the base layer both
have a non-NULL tqe_prev field in the device_list, although the base
node's tqe_prev field points to a NULL entry.  This non-NULL tqe_prev
field occurs after the bdrv_append() in the external snapshot calls
change_parent_backing_link().

In change_parent_backing_link(), when the previous active layer is
removed from device_list, the device_list.tqe_prev pointer is not
set to NULL.

The operating scheme in the block layer is to indicate that a BDS belongs
in the bdrv_states device_list iff the device_list.tqe_prev pointer
is non-NULL.

This patch does two things:

1.) Introduces a new block layer helper bdrv_device_remove() to remove a
    BDS from the device_list, and
2.) uses that new API, which also fixes the regression once used in
    change_parent_backing_link().

Signed-off-by: Jeff Cody <jcody@redhat.com>
Message-id: 0cd51e11c0666c04ddb7c05293fe94afeb551e89.1454376655.git.jcody@redhat.com
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
2016-02-02 18:04:47 +01:00
..
block block: set device_list.tqe_prev to NULL on BDS removal 2016-02-02 18:04:47 +01:00
crypto crypto: fix description of @errp parameter initialization 2016-02-01 14:11:35 +00:00
disas disas: Add print_insn to disassemble info 2015-07-09 15:20:40 +02:00
exec memory: Add address_space_init_shareable() 2016-01-21 14:15:06 +00:00
fpu fpu: Replace uint8 typedef with uint8_t 2016-01-22 15:09:21 +00:00
hw virtio-scsi: Catch BDS-BB removal/insertion 2016-02-02 17:50:46 +01:00
io io: fix description of @errp parameter initialization 2016-01-20 11:31:01 +00:00
libdecnumber Fix new typos in comments (found by codespell) 2014-07-18 17:45:36 +04:00
migration vmstate: Introduce VMSTATE_VARRAY_MULTPLY 2016-01-16 12:01:23 +00:00
monitor monitor/target-ppc: Define target_get_monitor_def 2015-11-12 14:53:36 +11:00
net ether/slirp: Avoid redefinition of the same constants 2016-01-11 11:01:35 +08:00
qapi error: New error_prepend(), error_reportf_err() 2016-01-13 15:16:17 +01:00
qemu Block layer patches 2016-01-21 13:09:47 +00:00
qom gdb: provide the name of the architecture in the target.xml 2016-01-27 15:34:48 +01:00
standard-headers linux-headers: update from kvm/next 2015-12-17 15:24:34 +01:00
sysemu block: Add blk_remove_all_bs() 2016-02-02 17:50:46 +01:00
ui sdl: shorten the GUI refresh interval when mouse or keyboard is active 2016-02-02 14:05:07 +01:00
config.h janitor: move remaining public headers to include/ 2012-12-19 08:32:46 +01:00
elf.h elf: add arm note types 2016-01-15 14:55:16 +00:00
glib-compat.h glib: add compatibility interface for g_hash_table_add() 2015-10-30 09:01:03 +01:00
qemu-common.h osdep.h: Include glib-compat.h in osdep.h rather than qemu-common.h 2016-01-11 11:39:28 +03:00
qemu-io.h qemu-io: Use BlockBackend 2015-02-16 15:07:19 +00:00
qjson.h QJSON: Add JSON writer 2015-02-05 17:16:14 +01:00
trace-tcg.h trace: [tcg] Generate TCG tracing routines 2014-08-12 14:26:12 +01:00
trace.h trace: [tcg] Include event definitions in "trace.h" 2014-08-12 14:26:12 +01:00