]> git.ipfire.org Git - thirdparty/qemu.git/commit - blockjob.c
blockjobs: model single jobs as transactions
authorJohn Snow <jsnow@redhat.com>
Sat, 10 Mar 2018 08:27:27 +0000 (03:27 -0500)
committerKevin Wolf <kwolf@redhat.com>
Mon, 19 Mar 2018 11:01:24 +0000 (12:01 +0100)
commit75859b9420906f72c1c6d6273481ff30c141dbd5
treea2f6e91fbe15a7c9531046dfa45d3311b89efb25
parentd4fce188448a273306b0c1c915e7bd91d6f83a6e
blockjobs: model single jobs as transactions

model all independent jobs as single job transactions.

It's one less case we have to worry about when we add more states to the
transition machine. This way, we can just treat all job lifetimes exactly
the same. This helps tighten assertions of the STM graph and removes some
conditionals that would have been needed in the coming commits adding a
more explicit job lifetime management API.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/backup.c
block/commit.c
block/mirror.c
block/stream.c
blockjob.c
include/block/blockjob.h
include/block/blockjob_int.h
tests/test-bdrv-drain.c
tests/test-blockjob-txn.c
tests/test-blockjob.c