]> git.ipfire.org Git - thirdparty/qemu.git/commit
block/commit: refactor commit to use job callbacks
authorJohn Snow <jsnow@redhat.com>
Thu, 6 Sep 2018 13:02:13 +0000 (09:02 -0400)
committerMax Reitz <mreitz@redhat.com>
Tue, 25 Sep 2018 13:31:15 +0000 (15:31 +0200)
commit22dffcbec62ba918db690ed44beba4bd4e970bb9
treee0c3c9838ee2316ce16f5d55de56cd3dc798b923
parentcf6320df581e6cbde6a95075266859a8f9ba9d55
block/commit: refactor commit to use job callbacks

Use the component callbacks; prepare, abort, and clean.

NB: prepare is only called when the job has not yet failed;
and abort can be called after prepare.

complete -> prepare -> abort -> clean
complete -> abort -> clean

During refactor, a potential problem with bdrv_drop_intermediate
was identified, the patched behavior is no worse than the pre-patch
behavior, so leave a FIXME for now to be fixed in a future patch.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: 20180906130225.5118-5-jsnow@redhat.com
Reviewed-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/commit.c