qemu-patch-raspberry4/include/block
Stefan Hajnoczi e8a095dadb block: use safe iteration over AioContext notifiers
It's possible that an AioContext notifier user was close to finishing
when .detach_aio_context() or .attached_aio_context() is called.  In
that case they may call bdrv_remove_aio_context_notifier() during the
callback.

Use safe iteration to avoid crashing when the notifier list is modified
during iteration.  We must not only handle the case where the current
aio notifier is removed during a callback but also the one where any
other aio notifier is removed.

The next patch adds an AioContext notifier for block jobs and they
really could be terminating just as .detach_aio_context() is invoked.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1466096189-6477-6-git-send-email-stefanha@redhat.com
2016-06-20 14:25:41 +01:00
..
accounting.h Use scripts/clean-includes to drop redundant qemu/typedefs.h 2016-03-22 22:20:16 +01:00
aio.h Use scripts/clean-includes to drop redundant qemu/typedefs.h 2016-03-22 22:20:16 +01:00
block.h block: Make .bdrv_load_vmstate() vectored 2016-06-16 15:19:55 +02:00
block_int.h block: use safe iteration over AioContext notifiers 2016-06-20 14:25:41 +01:00
blockjob.h blockjob: add pause points 2016-06-20 14:25:36 +01:00
dirty-bitmap.h block: Move block dirty bitmap code to separate files 2016-03-14 17:35:05 +01:00
nbd.h nbd: Avoid magic number for NBD max name size 2016-06-16 18:39:05 +02:00
qapi.h block/qapi: Use blk_enable_write_cache() 2016-03-30 12:16:02 +02:00
scsi.h typofixes - v4 2015-09-11 10:45:43 +03:00
snapshot.h include: Clean up includes 2016-02-23 12:43:05 +00:00
thread-pool.h block: Rename BlockDriverCompletionFunc to BlockCompletionFunc 2014-10-20 13:41:27 +02:00
throttle-groups.h block: Move I/O throttling configuration functions to BlockBackend 2016-05-19 16:45:30 +02:00
write-threshold.h Use scripts/clean-includes to drop redundant qemu/typedefs.h 2016-03-22 22:20:16 +01:00