Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver

2012-02-27 Thread Stefan Hajnoczi
On Thu, Feb 23, 2012 at 4:14 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Wed, Feb 22, 2012 at 5:13 PM, Federico Simoncelli fsimo...@redhat.com wrote: From: Marcelo Tosatti mtosa...@redhat.com Mirrored writes are used by live block copy. I think the right approach is to create a single

Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver

2012-02-27 Thread Paolo Bonzini
On 02/27/2012 10:23 AM, Stefan Hajnoczi wrote: I think the right approach is to create a single blkmirror driver that also includes blkverify functionality. The code is basically the same except blkverify also compares reads - just use a flag to enable/disable that behavior. Feel free

Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver

2012-02-27 Thread Stefan Hajnoczi
On Mon, Feb 27, 2012 at 11:37 AM, Paolo Bonzini pbonz...@redhat.com wrote: On 02/27/2012 10:23 AM, Stefan Hajnoczi wrote: I think the right approach is to create a single blkmirror driver that also includes blkverify functionality.  The code is basically the same except blkverify also

Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver

2012-02-27 Thread Paolo Bonzini
On 02/27/2012 12:42 PM, Stefan Hajnoczi wrote: Once non-incremental mode is added, I suspect blkmirror will diverge from blkverify significantly. In particular, we would need to track where have writes been done in the destination. We also would need to hooks for block/stream.c, or

Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver

2012-02-27 Thread Stefan Hajnoczi
On Mon, Feb 27, 2012 at 11:48 AM, Paolo Bonzini pbonz...@redhat.com wrote: On 02/27/2012 12:42 PM, Stefan Hajnoczi wrote: Once non-incremental mode is added, I suspect blkmirror will diverge from blkverify significantly.  In particular, we would need to track where have writes been done

Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver

2012-02-27 Thread Paolo Bonzini
On 02/27/2012 02:09 PM, Stefan Hajnoczi wrote: Non-incremental mode is pre-copy migration. It would stream in the background from the source to the destination. In this case: - you need to differentiate streaming writes from other writes. When streaming, you do not want to issue

Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver

2012-02-27 Thread Stefan Hajnoczi
On Mon, Feb 27, 2012 at 1:47 PM, Paolo Bonzini pbonz...@redhat.com wrote: On 02/27/2012 02:09 PM, Stefan Hajnoczi wrote: Non-incremental mode is pre-copy migration.  It would stream in the background from the source to the destination.  In this case: - you need to differentiate streaming

Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver

2012-02-27 Thread Stefan Hajnoczi
On Mon, Feb 27, 2012 at 2:49 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Mon, Feb 27, 2012 at 1:47 PM, Paolo Bonzini pbonz...@redhat.com wrote: On 02/27/2012 02:09 PM, Stefan Hajnoczi wrote: 3) blkverify in the future could add callbacks to create snapshots or load/save imgstate, and

Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver

2012-02-27 Thread Paolo Bonzini
On 02/27/2012 03:59 PM, Stefan Hajnoczi wrote: I guess what I'm saying is, if we need to copy-paste in order to fork them in the future that's fine, but why maintain duplicates in the mean-time? Please make the codebase nice today. We can always extend it in the future, we're not forced

Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver

2012-02-23 Thread Stefan Hajnoczi
On Wed, Feb 22, 2012 at 5:13 PM, Federico Simoncelli fsimo...@redhat.com wrote: From: Marcelo Tosatti mtosa...@redhat.com Mirrored writes are used by live block copy. I think the right approach is to create a single blkmirror driver that also includes blkverify functionality. The code is

Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver

2012-02-23 Thread Stefan Hajnoczi
On Thu, Feb 23, 2012 at 4:14 PM, Stefan Hajnoczi stefa...@gmail.com wrote: By the way, this code does not build against qemu.git/master.  It uses interfaces which have been dropped. Ah, I see you changed that in Patch 2/3. Please don't do that, it's hard to review and breaks git-bisect.

Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver

2012-02-23 Thread Federico Simoncelli
- Original Message - From: Stefan Hajnoczi stefa...@gmail.com To: Federico Simoncelli fsimo...@redhat.com Cc: qemu-devel@nongnu.org, kw...@redhat.com, mtosa...@redhat.com Sent: Thursday, February 23, 2012 5:14:09 PM Subject: Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver

Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver

2012-02-23 Thread Federico Simoncelli
- Original Message - From: Stefan Hajnoczi stefa...@gmail.com To: Federico Simoncelli fsimo...@redhat.com Cc: qemu-devel@nongnu.org, kw...@redhat.com, mtosa...@redhat.com Sent: Thursday, February 23, 2012 5:18:41 PM Subject: Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver

Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver

2012-02-23 Thread Stefan Hajnoczi
5:18:41 PM Subject: Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver On Thu, Feb 23, 2012 at 4:14 PM, Stefan Hajnoczi stefa...@gmail.com wrote: By the way, this code does not build against qemu.git/master.  It uses interfaces which have been dropped. Ah, I see you changed

Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver

2012-02-23 Thread Federico Simoncelli
- Original Message - From: Stefan Hajnoczi stefa...@gmail.com To: Federico Simoncelli fsimo...@redhat.com Cc: qemu-devel@nongnu.org, kw...@redhat.com, mtosa...@redhat.com Sent: Thursday, February 23, 2012 5:28:23 PM Subject: Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver

[Qemu-devel] [PATCH 1/3] Add blkmirror block driver

2012-02-22 Thread Federico Simoncelli
From: Marcelo Tosatti mtosa...@redhat.com Mirrored writes are used by live block copy. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- Makefile.objs |2 +- block/blkmirror.c | 282 docs/blkmirror.txt | 15 +++ 3 files