On 2018-08-24 00:08, John Snow wrote: > Utilize the job_exit shim by not calling job_defer_to_main_loop, and > where applicable, converting the deferred callback into the job_exit > callback. > > This converts backup, stream, create, and the unit tests all at once. > Most of these jobs do not see any changes to the order in which they > clean up their resources, except the test-blockjob-txn test, which > now puts down its bs before job_completed is called. > > This is safe for the same reason the reordering in the mirror job is > safe, because job_completed no longer runs under two locks, making > the unref safe even if it causes a flush. > > Signed-off-by: John Snow <js...@redhat.com> > --- > block/backup.c | 16 ---------------- > block/create.c | 14 +++----------- > block/stream.c | 22 +++++++--------------- > tests/test-bdrv-drain.c | 6 ------ > tests/test-blockjob-txn.c | 11 ++--------- > tests/test-blockjob.c | 10 ++++------ > 6 files changed, 16 insertions(+), 63 deletions(-)
Reviewed-by: Max Reitz <mre...@redhat.com>
signature.asc
Description: OpenPGP digital signature