Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-23 Thread Stefan Hajnoczi
On Wed, May 22, 2013 at 11:46:15PM +0200, Paolo Bonzini wrote: Il 22/05/2013 22:47, Richard W.M. Jones ha scritto: I meant if there was interest in reading from a disk that isn't fully synchronized (yet) to the original disk (it might have old blocks). Or would you only want to

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-22 Thread Wolfgang Richter
On Wed, May 15, 2013 at 7:54 AM, Paolo Bonzini pbonz...@redhat.com wrote: But does this really cover all use cases a real synchronous active mirror would provide? I understood that Wolf wants to get every single guest request exposed e.g. on an NBD connection. He can use throttling to

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-22 Thread Wolfgang Richter
On Thu, May 16, 2013 at 9:44 AM, Richard W.M. Jones rjo...@redhat.comwrote: Ideally I'd like to issue some QMP commands which would set up the point-in-time snapshot, and then connect to this snapshot over (eg) NBD, then when I'm done, send some more QMP commands to tear down the snapshot.

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-22 Thread Paolo Bonzini
Il 22/05/2013 17:51, Wolfgang Richter ha scritto: On Thu, May 16, 2013 at 9:44 AM, Richard W.M. Jones rjo...@redhat.com mailto:rjo...@redhat.com wrote: Ideally I'd like to issue some QMP commands which would set up the point-in-time snapshot, and then connect to this snapshot over

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-22 Thread Wolfgang Richter
On Wed, May 22, 2013 at 12:11 PM, Paolo Bonzini pbonz...@redhat.com wrote: Essentially, if you're RWMJ (not me), and you're keeping a full mirror, it's clear that the mirror write stream goes to an nbd server, but is it possible to attach a reader to that same nbd server and read things

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-22 Thread Richard W.M. Jones
On Wed, May 22, 2013 at 11:51:16AM -0400, Wolfgang Richter wrote: This is actually interesting. Does the QEMU nbd server support multiple readers? Yes. qemu-nbd has a -e/--shared=N option which appears to do exactly what it says in the man page. $ guestfish -N fs exit $ ls -lh test1.img

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-22 Thread Wolfgang Richter
On Wed, May 22, 2013 at 12:42 PM, Richard W.M. Jones rjo...@redhat.comwrote: Run up to two extra guestfish instances, with the same result. The fourth guestfish instance hangs at the 'run' command until one of the first three is told to exit. And your interested on being notified when a

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-22 Thread Richard W.M. Jones
On Wed, May 22, 2013 at 02:32:37PM -0400, Wolfgang Richter wrote: On Wed, May 22, 2013 at 12:42 PM, Richard W.M. Jones rjo...@redhat.comwrote: Run up to two extra guestfish instances, with the same result. The fourth guestfish instance hangs at the 'run' command until one of the first

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-22 Thread Wolfgang Richter
On Wed, May 22, 2013 at 3:26 PM, Richard W.M. Jones rjo...@redhat.comwrote: On Wed, May 22, 2013 at 02:32:37PM -0400, Wolfgang Richter wrote: On Wed, May 22, 2013 at 12:42 PM, Richard W.M. Jones rjo...@redhat.com wrote: Run up to two extra guestfish instances, with the same result. The

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-22 Thread Richard W.M. Jones
On Wed, May 22, 2013 at 03:38:33PM -0400, Wolfgang Richter wrote: On Wed, May 22, 2013 at 3:26 PM, Richard W.M. Jones rjo...@redhat.comwrote: On Wed, May 22, 2013 at 02:32:37PM -0400, Wolfgang Richter wrote: On Wed, May 22, 2013 at 12:42 PM, Richard W.M. Jones rjo...@redhat.com wrote:

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-22 Thread Paolo Bonzini
Il 22/05/2013 22:47, Richard W.M. Jones ha scritto: I meant if there was interest in reading from a disk that isn't fully synchronized (yet) to the original disk (it might have old blocks). Or would you only want to connect once a (complete) snapshot is available (synchronized

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-16 Thread Richard W.M. Jones
[...] From my point of view, what I'm missing here is how would I use it. Ideally I'd like to issue some QMP commands which would set up the point-in-time snapshot, and then connect to this snapshot over (eg) NBD, then when I'm done, send some more QMP commands to tear down the snapshot. I

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-15 Thread Kevin Wolf
Am 14.05.2013 um 18:45 hat Paolo Bonzini geschrieben: Il 14/05/2013 17:48, Wolfgang Richter ha scritto: On Tue, May 14, 2013 at 6:04 AM, Paolo Bonzini pbonz...@redhat.com mailto:pbonz...@redhat.com wrote: Il 14/05/2013 10:50, Kevin Wolf ha scritto: Or, to translate it into our

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-15 Thread Paolo Bonzini
Il 15/05/2013 09:59, Kevin Wolf ha scritto: Do you mean you'd model the 'active' mode after 'block-backup,' or actually call functions provided by 'block-backup'? No, I'll just reuse the same hooks within block/mirror.c (almost... it looks like I need after_write too, not just before_write :(

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-15 Thread Paolo Bonzini
We don't need a way to pass data from before to after hooks, a simple scan of a linked list will do. So in this case the linked list is the way. Point taken. :) Does the if there was no room part mean that the mirror is active only sometimes? Yes, otherwise the guest can

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-15 Thread Paolo Bonzini
Il 15/05/2013 11:46, Kevin Wolf ha scritto: Am 15.05.2013 um 11:16 hat Paolo Bonzini geschrieben: Does the if there was no room part mean that the mirror is active only sometimes? Yes, otherwise the guest can allocate arbitrary amounts of memory in the host just by starting a few very large

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-14 Thread Stefan Hajnoczi
On Mon, May 13, 2013 at 05:21:54PM -0400, Wolfgang Richter wrote: I'm working on a new patch series which will add a new QMP command, block-trace, which turns on tracing of writes for a specified block device and sends the stream unmodified to another block device. The 'trace' is meant to

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-14 Thread Kevin Wolf
Am 13.05.2013 um 23:21 hat Wolfgang Richter geschrieben: I'm working on a new patch series which will add a new QMP command, block-trace, which turns on tracing of writes for a specified block device and sends the stream unmodified to another block device.  The 'trace' is meant to be precise

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-14 Thread Paolo Bonzini
Il 14/05/2013 10:50, Kevin Wolf ha scritto: Or, to translate it into our existing terminology, drive-mirror implements a passive mirror, you're proposing an active one (which we do want to have). With an active mirror, we'll want to have another choice: The mirror can be synchronous (guest

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-14 Thread Wolfgang Richter
On Tue, May 14, 2013 at 4:40 AM, Stefan Hajnoczi stefa...@redhat.comwrote: QEMU is accumulating many different approaches to snapshots and mirroring. They all have their pros and cons so it's not possible to support only one approach for all use cases. The suggested approach is writing a

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-14 Thread Wolfgang Richter
On Tue, May 14, 2013 at 4:50 AM, Kevin Wolf kw...@redhat.com wrote: Or, to translate it into our existing terminology, drive-mirror implements a passive mirror, you're proposing an active one (which we do want to have). With an active mirror, we'll want to have another choice: The mirror can

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-14 Thread Wolfgang Richter
On Tue, May 14, 2013 at 6:04 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 14/05/2013 10:50, Kevin Wolf ha scritto: Or, to translate it into our existing terminology, drive-mirror implements a passive mirror, you're proposing an active one (which we do want to have). With an active

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-14 Thread Paolo Bonzini
Il 14/05/2013 17:48, Wolfgang Richter ha scritto: On Tue, May 14, 2013 at 6:04 AM, Paolo Bonzini pbonz...@redhat.com mailto:pbonz...@redhat.com wrote: Il 14/05/2013 10:50, Kevin Wolf ha scritto: Or, to translate it into our existing terminology, drive-mirror implements a

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-14 Thread Wolfgang Richter
On Tue, May 14, 2013 at 12:45 PM, Paolo Bonzini pbonz...@redhat.com wrote: No, I'll just reuse the same hooks within block/mirror.c (almost... it looks like I need after_write too, not just before_write :( that's a pity). Basically: 1) before the write, if there is space in the job's