From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf5lL-0007Ub-LT for qemu-devel@nongnu.org; Wed, 22 May 2013 05:55:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uf5lE-0003a6-R1 for qemu-devel@nongnu.org; Wed, 22 May 2013 05:55:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf5lE-0003Zs-Ji for qemu-devel@nongnu.org; Wed, 22 May 2013 05:55:08 -0400 Message-ID: <519C95EF.8080303@redhat.com> Date: Wed, 22 May 2013 11:54:55 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1368693379-8434-1-git-send-email-stefanha@redhat.com> <1368693379-8434-3-git-send-email-stefanha@redhat.com> <20130522093802.GA2541@dhcp-200-207.str.redhat.com> In-Reply-To: <20130522093802.GA2541@dhcp-200-207.str.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 2/8] block: add basic backup support to block driver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Fam Zheng , qemu-devel@nongnu.org, dietmar@proxmox.com, imain@redhat.com, Stefan Hajnoczi , xiawenc@linux.vnet.ibm.com Il 22/05/2013 11:38, Kevin Wolf ha scritto: >> + >> + DPRINTF("brdv_co_backup_cow done C%" PRId64 "\n", start); >> + } >> + >> +out: >> + if (bounce_buffer) { >> + qemu_vfree(bounce_buffer); >> + } >> + >> + cow_request_end(&cow_request); >> + >> + qemu_co_rwlock_unlock(&job->flush_rwlock); >> + >> + return ret; >> +} >> + >> +static void coroutine_fn backup_before_write_notify(Notifier *notifier, >> + void *opaque) >> +{ >> + BdrvTrackedRequest *req = opaque; >> + backup_do_cow(req->bs, req->sector_num, req->nb_sectors); >> +} > > I don't think you can ignore errors here. Not sure if we can stop the VM > and resume later or something like that, but if we can't, the backup > will be invalid and we must fail the job. Yes, there is rerror/werror machinery for jobs that this patch is not using. Paolo