On Fri, Jul 10, 2015 at 11:46:49AM +0800, Fam Zheng wrote: > static BlockErrorAction backup_error_action(BackupBlockJob *job, > @@ -444,7 +462,7 @@ static void coroutine_fn backup_run(void *opaque) > qemu_co_rwlock_wrlock(&job->flush_rwlock); > qemu_co_rwlock_unlock(&job->flush_rwlock); > > - if (job->sync_bitmap) { > + if (!job->common.txn && job->sync_bitmap) { > backup_handle_dirty_bitmap(job, ret); > } > hbitmap_free(job->bitmap); It would be nice if the core blockjob code called commit/abort even when there is no txn object. That way we can avoid special case code > diff --git a/qapi/block-core.json b/qapi/block-core.json > index 7b2efb8..d5e33fd 100644 > --- a/qapi/block-core.json > +++ b/qapi/block-core.json > @@ -736,6 +736,10 @@ > # default 'report' (no limitations, since this applies to > # a different block device than @device). > # > +# @transactional-cancel: #optional whether failure or cancellation of other > +# block jobs with @transactional-cancel true causes the > +# whole group to cancel. > +# > # Note that @on-source-error and @on-target-error only affect background I/O. > # If an error occurs during a guest write request, the device's rerror/werror > # actions will be used. > @@ -747,7 +751,8 @@ > 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode', > '*speed': 'int', '*bitmap': 'str', > '*on-source-error': 'BlockdevOnError', > - '*on-target-error': 'BlockdevOnError' } } > + '*on-target-error': 'BlockdevOnError', > + '*transactional-cancel': 'bool' } } > > ## > # @BlockdevBackup > @@ -771,6 +776,10 @@ > # default 'report' (no limitations, since this applies to > # a different block device than @device). > # > +# @transactional-cancel: #optional whether failure or cancellation of other > +# block jobs with @transactional-cancel true causes the > +# whole group to cancel. > +# > # Note that @on-source-error and @on-target-error only affect background I/O. > # If an error occurs during a guest write request, the device's rerror/werror > # actions will be used. > @@ -782,7 +791,8 @@ > 'sync': 'MirrorSyncMode', > '*speed': 'int', > '*on-source-error': 'BlockdevOnError', > - '*on-target-error': 'BlockdevOnError' } } > + '*on-target-error': 'BlockdevOnError', > + '*transactional-cancel': 'bool' } } The doc comments are missing (Since: 2.5). My fault, sorry!