qemu-patch-raspberry4/include
John Snow e8a40bf71d blockjob: add .clean property
Cleaning up after we have deferred to the main thread but before the
transaction has converged can be dangerous and result in deadlocks
if the job cleanup invokes any BH polling loops.

A job may attempt to begin cleaning up, but may induce another job to
enter its cleanup routine. The second job, part of our same transaction,
will block waiting for the first job to finish, so neither job may now
make progress.

To rectify this, allow jobs to register a cleanup operation that will
always run regardless of if the job was in a transaction or not, and
if the transaction job group completed successfully or not.

Move sensitive cleanup to this callback instead which is guaranteed to
be run only after the transaction has converged, which removes sensitive
timing constraints from said cleanup.

Furthermore, in future patches these cleanup operations will be performed
regardless of whether or not we actually started the job. Therefore,
cleanup callbacks should essentially confine themselves to undoing create
operations, e.g. setup actions taken in what is now backup_start.

Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 1478587839-9834-3-git-send-email-jsnow@redhat.com
Signed-off-by: Jeff Cody <jcody@redhat.com>
2016-11-14 22:47:34 -05:00
..
block blockjob: add .clean property 2016-11-14 22:47:34 -05:00
crypto crypto: add CTR mode support 2016-10-19 10:09:24 +01:00
disas disas: Fix ATTRIBUTE_UNUSED define clash with ALSA headers 2016-07-19 16:40:39 +01:00
exec VFIO updates 2016-10-31 2016-10-31 18:19:06 +00:00
fpu fpu: add mechanism to check for invalid long double formats 2016-09-15 12:43:18 +01:00
hw Xen 2016/11/02 2016-11-04 09:26:24 +00:00
io io: add ability to set a name for IO channels 2016-10-27 09:13:10 +02:00
libdecnumber Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
migration COLO: Implement the process of failover for primary VM 2016-10-30 15:17:39 +05:30
monitor monitor: deprecate 'default' option 2016-10-28 18:17:23 +03:00
net Remove unused function declarations 2016-09-15 15:32:22 +03:00
qapi qdict: implement a qdict_crumple method for un-flattening a dict 2016-10-25 17:56:14 +02:00
qemu * NBD bugfix (Changlong) 2016-11-03 16:32:30 +00:00
qom *_run_on_cpu: introduce run_on_cpu_data type 2016-10-31 15:00:25 +01:00
standard-headers virtio-crypto: add virtio crypto device emulation 2016-11-01 19:21:08 +02:00
sysemu virtio, pc: fixes and features 2016-11-03 14:41:53 +00:00
ui spice/gl: render DisplaySurface via opengl 2016-09-28 12:49:36 +02:00
elf.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
glib-compat.h tests: send error_report to test log 2016-11-01 16:06:57 +01:00
qemu-common.h tcg: Add EXCP_ATOMIC 2016-10-26 08:29:00 -07:00
qemu-io.h qemu-io: Use BlockBackend 2015-02-16 15:07:19 +00:00
trace-tcg.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00
trace.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00