Re: [Qemu-devel] [RFC v2 PATCH 0/6] Live block commit

2012-08-30 Thread Jeff Cody
On 08/30/2012 02:47 PM, Jeff Cody wrote:
> 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
> 
> 

I meant to add this to my cover letter, but forgot; if anyone wants to play 
around
with this, you can find it on github:

git://github.com/codyprime/qemu-kvm-jtc.git  (branch jtc-live-commit-1.3)




> 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
> 




[Qemu-devel] [RFC v2 PATCH 0/6] Live block commit

2012-08-30 Thread Jeff Cody
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