qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 05/10] block: add block job transactions


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH v2 05/10] block: add block job transactions
Date: Tue, 7 Jul 2015 15:32:45 +0800
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, 07/06 15:24, Stefan Hajnoczi wrote:
> +/**
> + * block_job_txn_add_job:
> + * @txn: The transaction (may be NULL)
> + * @job: Job to add to the transaction
> + *
> + * Add @job to the transaction.  The @job must not already be in a 
> transaction.
> + * The block job driver must call block_job_txn_prepare_to_complete() before

s/block_job_txn_prepare_to_complete/block_job_txn_job_done/

Reading this for a second time I start to feel it too complicated for the good.

I have another idea: in block_job_completed, check if other jobs have failed,
and call this job driver's (imaginary) "abort()" callback accordingly; if all
jobs has succeeded, call a "commit" callback during last block_job_completed.

Does that make sense?

Fam



reply via email to

[Prev in Thread] Current Thread [Next in Thread]