Re: [Qemu-devel] [PATCH v3 12/15] block/backup: support block job transactions

2015-07-14 Thread Stefan Hajnoczi
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);

Re: [Qemu-devel] [PATCH v3 12/15] block/backup: support block job transactions

2015-07-13 Thread Fam Zheng
On Mon, 07/13 19:14, John Snow wrote: > > +static void backup_txn_commit(BlockJob *job) > > +{ > > +BackupBlockJob *s = container_of(job, BackupBlockJob, common); > > +if (s->sync_bitmap) { > > +backup_handle_dirty_bitmap(s, 0); > > +} > > +} > > + > > +static void backup_txn_ab

Re: [Qemu-devel] [PATCH v3 12/15] block/backup: support block job transactions

2015-07-13 Thread John Snow
On 07/09/2015 11:46 PM, Fam Zheng wrote: > From: Stefan Hajnoczi > > Join the transaction when the 'transactional-cancel' QMP argument is > true. > > This ensures that the sync bitmap is not thrown away if another block > job in the transaction is cancelled or fails. This is critical so > inc

[Qemu-devel] [PATCH v3 12/15] block/backup: support block job transactions

2015-07-09 Thread Fam Zheng
From: Stefan Hajnoczi Join the transaction when the 'transactional-cancel' QMP argument is true. This ensures that the sync bitmap is not thrown away if another block job in the transaction is cancelled or fails. This is critical so incremental backup with multiple disks can be retried in case