qemu-patch-raspberry4/block
Eric Blake 1158bb2a05 qapi: Add parameter to visit_end_*
Rather than making the dealloc visitor track of stack of pointers
remembered during visit_start_* in order to free them during
visit_end_*, it's a lot easier to just make all callers pass the
same pointer to visit_end_*.  The generated code has access to the
same pointer, while all other users are doing virtual walks and
can pass NULL.  The dealloc visitor is then greatly simplified.

All three visit_end_*() functions intentionally take a void**,
even though the visit_start_*() functions differ between void**,
GenericList**, and GenericAlternate**.  This is done for several
reasons: when doing a virtual walk, passing NULL doesn't care
what the type is, but when doing a generated walk, we already
have to cast the caller's specific FOO* to call visit_start,
while using void** lets us use visit_end without a cast. Also,
an upcoming patch will add a clone visitor that wants to use
the same implementation for all three visit_end callbacks,
which is made easier if all three share the same signature.

For visitors with already track per-object state (the QMP visitors
via a stack, and the string visitors which do not allow nesting),
add an assertion that the caller is indeed passing the same
pointer to paired calls.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1465490926-28625-4-git-send-email-eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2016-07-06 10:52:04 +02:00
..
accounting.c block: Clean up includes 2016-01-20 13:36:23 +01:00
archipelago.c coccinelle: Remove unnecessary variables for function return value 2016-06-20 16:38:13 +02:00
backup.c blockjob: assert(cb) when create job 2016-06-28 23:08:13 -04:00
blkdebug.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
blkreplay.c blkreplay: Convert to bdrv_co_pwrite_zeroes() 2016-06-08 10:21:08 +02:00
blkverify.c block: Propagate AioContext change to all children 2016-05-19 16:45:31 +02:00
block-backend.c block: Make blk_co_preadv/pwritev() public 2016-05-25 19:04:21 +02:00
bochs.c qemu-common: stop including qemu/bswap.h from qemu-common.h 2016-05-19 16:42:28 +02:00
cloop.c qemu-common: stop including qemu/bswap.h from qemu-common.h 2016-05-19 16:42:28 +02:00
commit.c block: Create the commit block job before reopening any image 2016-06-16 15:20:37 +02:00
crypto.c qapi: Add parameter to visit_end_* 2016-07-06 10:52:04 +02:00
curl.c block: always compile-check debug prints 2016-05-12 15:22:08 +02:00
dirty-bitmap.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
dmg.c all: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
gluster.c block/gluster: add support for selecting debug logging level 2016-06-28 22:52:45 -04:00
io.c block: process before_write_notifiers in bdrv_co_discard 2016-06-20 11:44:12 +01:00
iscsi.c iscsi: fix assertion in is_sector_request_lun_aligned 2016-06-29 14:03:47 +02:00
linux-aio.c linux-aio: Cancel BH if not needed 2016-06-16 15:19:55 +02:00
Makefile.objs replay: introduce block devices record/replay 2016-03-30 12:15:57 +02:00
mirror.c mirror: fix misleading comments 2016-06-28 23:08:25 -04:00
nbd-client.c nbd: Simplify client FUA handling 2016-05-12 15:22:09 +02:00
nbd-client.h nbd: Simplify client FUA handling 2016-05-12 15:22:09 +02:00
nbd.c nbd: Simplify client FUA handling 2016-05-12 15:22:09 +02:00
nfs.c block/nfs: add support for libnfs pagecache 2016-06-28 22:52:45 -04:00
null.c block/null: Implement bdrv_refresh_filename() 2016-06-16 15:20:37 +02:00
parallels.c block: Switch bdrv_write_zeroes() to byte interface 2016-06-08 10:21:08 +02:00
qapi.c block: Don't return throttling info in query-named-block-nodes 2016-05-19 16:45:31 +02:00
qcow.c block: drop support for using qcow[2] encryption with system emulators 2016-06-16 15:19:55 +02:00
qcow2-cache.c os-posix: include sys/mman.h 2016-06-16 18:39:03 +02:00
qcow2-cluster.c coccinelle: Remove unnecessary variables for function return value 2016-06-20 16:38:13 +02:00
qcow2-refcount.c coccinelle: Remove unnecessary variables for function return value 2016-06-20 16:38:13 +02:00
qcow2-snapshot.c qemu-common: stop including qemu/bswap.h from qemu-common.h 2016-05-19 16:42:28 +02:00
qcow2.c error: Remove NULL checks on error_propagate() calls 2016-06-20 16:38:13 +02:00
qcow2.h qcow2: Implement .bdrv_co_pwritev() 2016-06-16 15:19:55 +02:00
qed-check.c qed: Use DIV_ROUND_UP 2016-06-07 18:19:24 +03:00
qed-cluster.c block: Clean up includes 2016-01-20 13:36:23 +01:00
qed-gencb.c block: Clean up includes 2016-01-20 13:36:23 +01:00
qed-l2-cache.c block: Clean up includes 2016-01-20 13:36:23 +01:00
qed-table.c qemu-common: stop including qemu/bswap.h from qemu-common.h 2016-05-19 16:42:28 +02:00
qed.c qed: Convert to bdrv_co_pwrite_zeroes() 2016-06-08 10:21:08 +02:00
qed.h util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
quorum.c error: Remove NULL checks on error_propagate() calls 2016-06-20 16:38:13 +02:00
raw-aio.h raw-posix: Implement .bdrv_co_preadv/pwritev 2016-06-16 15:19:55 +02:00
raw-posix.c coccinelle: Remove unnecessary variables for function return value 2016-06-20 16:38:13 +02:00
raw-win32.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
raw_bsd.c coccinelle: Remove unnecessary variables for function return value 2016-06-20 16:38:13 +02:00
rbd.c coccinelle: Remove unnecessary variables for function return value 2016-06-20 16:38:13 +02:00
sheepdog.c block: Make .bdrv_load_vmstate() vectored 2016-06-16 15:19:55 +02:00
snapshot.c error: Remove NULL checks on error_propagate() calls 2016-06-20 16:38:13 +02:00
ssh.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
stream.c stream: Use BlockBackend for I/O 2016-05-25 19:04:21 +02:00
throttle-groups.c block: Move I/O throttling configuration functions to BlockBackend 2016-05-19 16:45:30 +02:00
trace-events trace: split out trace events for block/ directory 2016-06-20 17:22:14 +01:00
vdi.c qemu-common: stop including qemu/bswap.h from qemu-common.h 2016-05-19 16:42:28 +02:00
vhdx-endian.c qemu-common: stop including qemu/bswap.h from qemu-common.h 2016-05-19 16:42:28 +02:00
vhdx-log.c qemu-common: stop including qemu/bswap.h from qemu-common.h 2016-05-19 16:42:28 +02:00
vhdx.c all: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
vhdx.h block: vhdx - update PAYLOAD_BLOCK_UNMAPPED value to match 1.00 spec 2014-12-12 15:42:22 +00:00
vmdk.c coccinelle: Remove unnecessary variables for function return value 2016-06-20 16:38:13 +02:00
vpc.c qemu-common: stop including qemu/bswap.h from qemu-common.h 2016-05-19 16:42:28 +02:00
vvfat.c coccinelle: Remove unnecessary variables for function return value 2016-06-20 16:38:13 +02:00
win32-aio.c block: Clean up includes 2016-01-20 13:36:23 +01:00
write-threshold.c block: Clean up includes 2016-01-20 13:36:23 +01:00