Re: [Qemu-devel] [PATCH v2 1/3] block: add basic backup support to block driver

2013-05-30 Thread Stefan Hajnoczi
On Thu, May 30, 2013 at 5:37 AM, Fam Zheng wrote: > On Mon, 04/29 09:42, Stefan Hajnoczi wrote: >> + >> +static void coroutine_fn backup_run(void *opaque) >> +{ >> +BackupBlockJob *job = opaque; >> +BlockDriverState *bs = job->common.bs; >> +assert(bs); >> + >> +int64_t start, end;

Re: [Qemu-devel] [PATCH v2 1/3] block: add basic backup support to block driver

2013-05-29 Thread Fam Zheng
On Mon, 04/29 09:42, Stefan Hajnoczi wrote: > + > +static void coroutine_fn backup_run(void *opaque) > +{ > +BackupBlockJob *job = opaque; > +BlockDriverState *bs = job->common.bs; > +assert(bs); > + > +int64_t start, end; > + > +start = 0; > +end = DIV_ROUND_UP(bdrv_getleng

Re: [Qemu-devel] [PATCH v2 1/3] block: add basic backup support to block driver

2013-05-14 Thread Stefan Hajnoczi
On Tue, May 14, 2013 at 3:43 PM, Kevin Wolf wrote: > Am 14.05.2013 um 15:24 hat Stefan Hajnoczi geschrieben: >> On Wed, May 08, 2013 at 02:39:25PM +0200, Kevin Wolf wrote: >> > Am 29.04.2013 um 09:42 hat Stefan Hajnoczi geschrieben: >> > > diff --git a/include/block/blockjob.h b/include/block/bloc

Re: [Qemu-devel] [PATCH v2 1/3] block: add basic backup support to block driver

2013-05-14 Thread Kevin Wolf
Am 14.05.2013 um 15:24 hat Stefan Hajnoczi geschrieben: > On Wed, May 08, 2013 at 02:39:25PM +0200, Kevin Wolf wrote: > > Am 29.04.2013 um 09:42 hat Stefan Hajnoczi geschrieben: > > > diff --git a/include/block/blockjob.h b/include/block/blockjob.h > > > index c290d07..6f42495 100644 > > > --- a/in

Re: [Qemu-devel] [PATCH v2 1/3] block: add basic backup support to block driver

2013-05-14 Thread Stefan Hajnoczi
On Wed, May 08, 2013 at 02:39:25PM +0200, Kevin Wolf wrote: > Am 29.04.2013 um 09:42 hat Stefan Hajnoczi geschrieben: > > diff --git a/include/block/blockjob.h b/include/block/blockjob.h > > index c290d07..6f42495 100644 > > --- a/include/block/blockjob.h > > +++ b/include/block/blockjob.h > > @@ -

Re: [Qemu-devel] [PATCH v2 1/3] block: add basic backup support to block driver

2013-05-14 Thread Stefan Hajnoczi
On Wed, May 08, 2013 at 02:39:25PM +0200, Kevin Wolf wrote: > Am 29.04.2013 um 09:42 hat Stefan Hajnoczi geschrieben: > > Sorry, but this patch doesn't look very close to mergable yet. Fair enough. I had some ideas on decoupling the backup block job from the core block layer, making fewer assumpt

Re: [Qemu-devel] [PATCH v2 1/3] block: add basic backup support to block driver

2013-05-08 Thread Paolo Bonzini
Il 08/05/2013 14:39, Kevin Wolf ha scritto: > Am 29.04.2013 um 09:42 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 du

Re: [Qemu-devel] [PATCH v2 1/3] block: add basic backup support to block driver

2013-05-08 Thread Kevin Wolf
Am 29.04.2013 um 09:42 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 da

[Qemu-devel] [PATCH v2 1/3] block: add basic backup support to block driver

2013-05-01 Thread Stefan Hajnoczi
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