From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T79mS-0005K5-GC for qemu-devel@nongnu.org; Thu, 30 Aug 2012 14:47:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T79mQ-0005KL-Sa for qemu-devel@nongnu.org; Thu, 30 Aug 2012 14:47:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47316) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T79mQ-0005KB-JS for qemu-devel@nongnu.org; Thu, 30 Aug 2012 14:47:50 -0400 From: Jeff Cody Date: Thu, 30 Aug 2012 14:47:38 -0400 Message-Id: Subject: [Qemu-devel] [RFC v2 PATCH 0/6] Live block commit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, stefanha@gmail.com, eblake@redhat.com, supriyak@linux.vnet.ibm.com Live block commit. I originally had intended for this RFC series to include the more complicated case of a live commit of the active layer, but removed it for this commit in the hopes of making it into the soft feature freeze for 1.2, so this series is the simpler case. This series adds the basic case, of a live commit between two images below the active layer, e.g.: [base] <--- [snp-1] <--- [snp-2] <--- [snp-3] <--- [active] can be collapsed down via commit, into: [base] <--- [active] or, [base] <--- [snp-1] <--- [active], [base] <--- [snp-3] <--- [active], etc.. TODO: * qemu-io tests (in progress) * 'stage-2' of live commit functionality, to be able to push down the active layer. This structured something like mirroring, to allow for convergence. Changes from the RFC v1 series: * This patch series is not on top of Paolo's blk mirror series yet, to make it easier to apply independently if desired. This means some of what was in the previous RFC series is not in this one (BlockdevOnError, for instance), but that can be easily added in once Paolo's series are in. * This patches series is dependent on the reopen() series with transactional reopen. * The target release for this series is 1.3 * Found some mistakes in the reopen calls * Dropped the BlockdevOnError argument (for now), will add in if rebasing on top of Paolo's series. * Used the new qerror system Jeff Cody (6): 1/6 block: add support functions for live commit, to find and delete images. 2/6 block: add live block commit functionality 3/6 blockdev: rename block_stream_cb to a generic block_job_cb 4/6 qerror: new error for live block commit, QERR_TOP_NOT_FOUND 5/6 block: helper function, to find the base image of a chain 6/6 QAPI: add command for live block commit, 'block-commit' block.c | 158 ++++++++++++++++++++++++++++++++++++++++ block.h | 6 +- block/Makefile.objs | 1 + block/commit.c | 202 ++++++++++++++++++++++++++++++++++++++++++++++++++++ block_int.h | 19 +++++ blockdev.c | 91 ++++++++++++++++++++++- qapi-schema.json | 30 ++++++++ qerror.h | 3 + qmp-commands.hx | 6 ++ trace-events | 4 +- 10 files changed, 515 insertions(+), 5 deletions(-) create mode 100644 block/commit.c -- 1.7.11.2