From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYq34-0005aS-I3 for qemu-devel@nongnu.org; Mon, 07 Sep 2015 02:37:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYq31-0001FE-Bq for qemu-devel@nongnu.org; Mon, 07 Sep 2015 02:37:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41963) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYq31-0001F7-6t for qemu-devel@nongnu.org; Mon, 07 Sep 2015 02:36:59 -0400 Date: Mon, 7 Sep 2015 14:36:55 +0800 From: Fam Zheng Message-ID: <20150907063655.GE3958@ad.nay.redhat.com> References: <1438238370-16212-1-git-send-email-famz@redhat.com> <1438238370-16212-10-git-send-email-famz@redhat.com> <55BFADB7.5040803@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55BFADB7.5040803@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 09/14] block: add block job transactions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Kevin Wolf , Jeff Cody , qemu-devel@nongnu.org, vsementsov@parallels.com, stefanha@redhat.com, John Snow On Mon, 08/03 20:06, Max Reitz wrote: > > s/who/which/ OK. > > >+ */ > >+ return; > >+ } > >+ txn->aborting = true; > >+ /* We are the first failed job. Cancel other jobs. */ > >+ QLIST_FOREACH(other_job, &txn->jobs, txn_list) { > >+ ctx = bdrv_get_aio_context(other_job->bs); > >+ aio_context_acquire(ctx); > >+ } > >+ QLIST_FOREACH(other_job, &txn->jobs, txn_list) { > >+ if (other_job == job || other_job->completed) { > >+ /* Other are "effectively" cancelled by us, so set the status for > > s/Other/Other jobs/? OK. > > >+ * them; this job, however, may or may not be cancelled, depending > >+ * on the caller, so leave it. */ > >+ other_job->cancelled = other_job != job; > > If other_job == job, this is not left as it was, but set to false. Right, I'll use an if block. > >+/** > >+ * 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 > >+ * final cleanup and completion. > > I see this function mentioned only here, only in this patch. That doesn't > seem right to me. It's stale. Will fix. Thanks! Fam