From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38234) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4Vae-0004Fh-Hw for qemu-devel@nongnu.org; Wed, 09 Nov 2016 11:19:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c4Vad-0004pl-LX for qemu-devel@nongnu.org; Wed, 09 Nov 2016 11:19:08 -0500 Date: Wed, 9 Nov 2016 11:18:58 -0500 From: Jeff Cody Message-ID: <20161109161858.GB6315@localhost.localdomain> References: <1478587839-9834-1-git-send-email-jsnow@redhat.com> <1478587839-9834-5-git-send-email-jsnow@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1478587839-9834-5-git-send-email-jsnow@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 4/6] blockjob: add block_job_start List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: qemu-block@nongnu.org, kwolf@redhat.com, vsementsov@virtuozzo.com, stefanha@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org On Tue, Nov 08, 2016 at 01:50:37AM -0500, John Snow wrote: > Instead of automatically starting jobs at creation time via backup_start > et al, we'd like to return a job object pointer that can be started > manually at later point in time. > > For now, add the block_job_start mechanism and start the jobs > automatically as we have been doing, with conversions job-by-job coming > in later patches. > > Of note: cancellation of unstarted jobs will perform all the normal > cleanup as if the job had started, particularly abort and clean. The > only difference is that we will not emit any events, because the job > never actually started. > > Signed-off-by: John Snow > --- > block/backup.c | 3 +-- > block/commit.c | 5 ++--- > block/mirror.c | 5 ++--- > block/stream.c | 5 ++--- > block/trace-events | 6 +++--- > blockjob.c | 54 ++++++++++++++++++++++++++++++++++++----------- > include/block/blockjob.h | 9 ++++++++ > tests/test-blockjob-txn.c | 12 +++++------ > 8 files changed, 67 insertions(+), 32 deletions(-) > Reviewed-by: Jeff Cody