From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoxGu-000189-OD for qemu-devel@nongnu.org; Tue, 18 Jun 2013 10:52:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UoxGt-0007ZR-GE for qemu-devel@nongnu.org; Tue, 18 Jun 2013 10:52:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoxGt-0007ZL-9T for qemu-devel@nongnu.org; Tue, 18 Jun 2013 10:52:35 -0400 Date: Tue, 18 Jun 2013 16:52:11 +0200 From: Kevin Wolf Message-ID: <20130618145211.GH3640@dhcp-200-207.str.redhat.com> References: <1369917299-5725-1-git-send-email-stefanha@redhat.com> <1369917299-5725-4-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1369917299-5725-4-git-send-email-stefanha@redhat.com> Subject: Re: [Qemu-devel] [PATCH v5 03/11] block: add basic backup support to block driver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Fam Zheng , qemu-devel@nongnu.org, dietmar@proxmox.com, imain@redhat.com, Paolo Bonzini , xiawenc@linux.vnet.ibm.com Am 30.05.2013 um 14:34 hat Stefan Hajnoczi geschrieben: > From: Dietmar Maurer > > backup_start() creates a block job that copies a point-in-time snapshot > of a block device to a target block device. > > We call backup_do_cow() for each write during backup. That function > reads the original data from the block device before it gets > overwritten. The data is then written to the target device. > > Currently backup cluster size is hardcoded to 65536 bytes. > > [I made a number of changes to Dietmar's original patch and folded them > in to make code review easy. Here is the full list: > > * Drop BackupDumpFunc interface in favor of a target block device > * Detect zero clusters with buffer_is_zero() and use bdrv_co_write_zeroes() > * Use 0 delay instead of 1us, like other block jobs > * Unify creation/start functions into backup_start() > * Simplify cleanup, free bitmap in backup_run() instead of cb > * function > * Use HBitmap to avoid duplicating bitmap code > * Use bdrv_getlength() instead of accessing ->total_sectors > * directly > * Delete the backup.h header file, it is no longer necessary > * Move ./backup.c to block/backup.c > * Remove #ifdefed out code > * Coding style and whitespace cleanups > * Use bdrv_add_before_write_notifier() instead of blockjob-specific hooks > * Keep our own in-flight CowRequest list instead of using block.c > tracked requests. This means a little code duplication but is much > simpler than trying to share the tracked requests list and use the > backup block size. > * Add on_source_error and on_target_error error handling. > > -- stefanha] > > Signed-off-by: Dietmar Maurer > Signed-off-by: Stefan Hajnoczi > > backup size fixes > > Signed-off-by: Stefan Hajnoczi You probably didn't want to have the second part in the final commit message? Kevin