Received: from eggs.gnu.org ([2001:4830:134:3::10]:47641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uzk9Y-0005Ic-Pb for qemu-devel@nongnu.org; Thu, 18 Jul 2013 05:05:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uzk9T-0006yy-Km for qemu-devel@nongnu.org; Thu, 18 Jul 2013 05:05:36 -0400 Received: from mail-wg0-x235.google.com ([2a00:1450:400c:c00::235]:45657) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uzk9T-0006yn-CM for qemu-devel@nongnu.org; Thu, 18 Jul 2013 05:05:31 -0400 Received: by mail-wg0-f53.google.com with SMTP id y10so2706859wgg.32 for ; Thu, 18 Jul 2013 02:05:30 -0700 (PDT) Date: Thu, 18 Jul 2013 17:05:20 +0800 From: Stefan Hajnoczi Message-ID: <20130718090520.GB9328@stefanha-thinkpad.redhat.com> References: <1374133730-20390-1-git-send-email-pl@kamp.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1374133730-20390-1-git-send-email-pl@kamp.de> Subject: Re: [Qemu-devel] [PATCHv4] block-migration: efficiently encode zero blocks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: kwolf@redhat.com, quintela@redhat.com, qemu-devel@nongnu.org, owasserm@redhat.com, stefanha@redhat.com, pbonzini@redhat.com On Thu, Jul 18, 2013 at 09:48:50AM +0200, Peter Lieven wrote: > this patch adds a efficient encoding for zero blocks by > adding a new flag indicating a block is completely zero. > > additionally bdrv_write_zeros() is used at the destination > to efficiently write these zeroes. depending on the implementation > this avoids that the destination target gets fully provisioned. > > Signed-off-by: Peter Lieven > --- > > v3->v4: > - rebased to current master > - stashed migrate_zero_blocks in BlkMigState. > - added additional comment in qapi-schema.json where to > enable the capability. > - added comment in the commit message about the benefit > of using bdrv_write_zeroes(). > > v2->v3: > - changed type of flags in blk_send() from int to uint64_t > - added migration capability setting to enable sending > of zero blocks. > > block-migration.c | 32 ++++++++++++++++++++++++++------ > include/migration/migration.h | 1 + > migration.c | 9 +++++++++ > qapi-schema.json | 8 +++++++- > 4 files changed, 43 insertions(+), 7 deletions(-) Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan