Re: [Qemu-devel] [PATCH 28/47] qmp: add drive-mirror command

2012-09-13 Thread Paolo Bonzini
Il 13/09/2012 15:26, Kevin Wolf ha scritto: > +flags = bs->open_flags | BDRV_O_RDWR; >>> >> Do we take care to make the image read-only again after completion? >> > >> > Not at the file-descriptor level, but bs->read_only is indeed restored >> > to "true" via bdrv_swap. >> > >> > Doing it

Re: [Qemu-devel] [PATCH 28/47] qmp: add drive-mirror command

2012-09-13 Thread Kevin Wolf
Am 13.09.2012 15:24, schrieb Paolo Bonzini: > Il 13/09/2012 15:15, Kevin Wolf ha scritto: +flags = bs->open_flags | BDRV_O_RDWR; >> Do we take care to make the image read-only again after completion? > > Not at the file-descriptor level, but bs->read_only is indeed restored > to "true" vi

Re: [Qemu-devel] [PATCH 28/47] qmp: add drive-mirror command

2012-09-13 Thread Paolo Bonzini
Il 13/09/2012 15:15, Kevin Wolf ha scritto: >> > +flags = bs->open_flags | BDRV_O_RDWR; > Do we take care to make the image read-only again after completion? Not at the file-descriptor level, but bs->read_only is indeed restored to "true" via bdrv_swap. Doing it on the file descriptor is poss

Re: [Qemu-devel] [PATCH 28/47] qmp: add drive-mirror command

2012-09-13 Thread Kevin Wolf
Am 24.07.2012 13:04, schrieb Paolo Bonzini: > This adds the monitor commands that start the mirroring job. > > Signed-off-by: Paolo Bonzini > --- > blockdev.c | 133 > -- > hmp-commands.hx | 21 + > hmp.c| 28 ++

Re: [Qemu-devel] [PATCH 28/47] qmp: add drive-mirror command

2012-07-31 Thread Paolo Bonzini
Il 31/07/2012 14:17, Kevin Wolf ha scritto: >> No, that should be ok. Though I'm not sure if it's so useful to apply >> throttling on the target. It's more useful to throttle the source >> (making writes slower than reads will help the job's convergence) and >> copy at full steam to the target. >

Re: [Qemu-devel] [PATCH 28/47] qmp: add drive-mirror command

2012-07-31 Thread Kevin Wolf
Am 31.07.2012 13:25, schrieb Paolo Bonzini: > Il 31/07/2012 13:13, Kevin Wolf ha scritto: >> Am 31.07.2012 12:51, schrieb Paolo Bonzini: >>> Il 31/07/2012 12:25, Kevin Wolf ha scritto: Another interesting thing is I/O throttling. The mirror currently implements rate limiting itself, but i

Re: [Qemu-devel] [PATCH 28/47] qmp: add drive-mirror command

2012-07-31 Thread Paolo Bonzini
Il 31/07/2012 13:13, Kevin Wolf ha scritto: > Am 31.07.2012 12:51, schrieb Paolo Bonzini: >> Il 31/07/2012 12:25, Kevin Wolf ha scritto: Yeah, but do you really care about for example io=threads vs. io=native? The only interesting one is cache=unsafe; the mirror should enable writeb

Re: [Qemu-devel] [PATCH 28/47] qmp: add drive-mirror command

2012-07-31 Thread Kevin Wolf
Am 31.07.2012 12:51, schrieb Paolo Bonzini: > Il 31/07/2012 12:25, Kevin Wolf ha scritto: >>> Yeah, but do you really care about for example io=threads vs. io=native? >>> The only interesting one is cache=unsafe; the mirror should enable >>> writeback caching on the target (bdrv_swap will disable

Re: [Qemu-devel] [PATCH 28/47] qmp: add drive-mirror command

2012-07-31 Thread Paolo Bonzini
Il 31/07/2012 12:25, Kevin Wolf ha scritto: >> Yeah, but do you really care about for example io=threads vs. io=native? >> The only interesting one is cache=unsafe; the mirror should enable >> writeback caching on the target (bdrv_swap will disable it if needed; >> I'll change this in the next sub

Re: [Qemu-devel] [PATCH 28/47] qmp: add drive-mirror command

2012-07-31 Thread Kevin Wolf
Am 31.07.2012 12:02, schrieb Paolo Bonzini: > Il 31/07/2012 11:46, Kevin Wolf ha scritto: I'm not even sure about the QMP mirror command itself. I don't really like it, it does too many things at once: It can create the target image file, it opens the target and it actually star

Re: [Qemu-devel] [PATCH 28/47] qmp: add drive-mirror command

2012-07-31 Thread Paolo Bonzini
Il 31/07/2012 11:46, Kevin Wolf ha scritto: >>> I'm not even sure about the QMP mirror command itself. >>> >>> I don't really like it, it does too many things at once: It can create >>> the target image file, it opens the target and it actually starts the >>> mirroring. It's rather bad at the first

Re: [Qemu-devel] [PATCH 28/47] qmp: add drive-mirror command

2012-07-31 Thread Kevin Wolf
Am 31.07.2012 11:33, schrieb Paolo Bonzini: > Il 31/07/2012 11:26, Kevin Wolf ha scritto: >> Am 24.07.2012 13:04, schrieb Paolo Bonzini: >>> This adds the monitor commands that start the mirroring job. >>> >>> Signed-off-by: Paolo Bonzini >> >> [ Moving the discussion upstream ] >> >>> Why make al

Re: [Qemu-devel] [PATCH 28/47] qmp: add drive-mirror command

2012-07-31 Thread Paolo Bonzini
Il 31/07/2012 11:26, Kevin Wolf ha scritto: > Am 24.07.2012 13:04, schrieb Paolo Bonzini: >> This adds the monitor commands that start the mirroring job. >> >> Signed-off-by: Paolo Bonzini > > [ Moving the discussion upstream ] > >> Why make all of it inaccessible? Everything except target devi

Re: [Qemu-devel] [PATCH 28/47] qmp: add drive-mirror command

2012-07-31 Thread Kevin Wolf
Am 24.07.2012 13:04, schrieb Paolo Bonzini: > This adds the monitor commands that start the mirroring job. > > Signed-off-by: Paolo Bonzini [ Moving the discussion upstream ] > Why make all of it inaccessible? Everything except target device access > does have a stable API. The target device

Re: [Qemu-devel] [PATCH 28/47] qmp: add drive-mirror command

2012-07-27 Thread Paolo Bonzini
Il 27/07/2012 01:42, Eric Blake ha scritto: > On 07/24/2012 05:04 AM, Paolo Bonzini wrote: >> This adds the monitor commands that start the mirroring job. >> >> Signed-off-by: Paolo Bonzini >> --- >> blockdev.c | 133 >> -- >> hmp-comman

Re: [Qemu-devel] [PATCH 28/47] qmp: add drive-mirror command

2012-07-26 Thread Eric Blake
On 07/24/2012 05:04 AM, Paolo Bonzini wrote: > This adds the monitor commands that start the mirroring job. > > Signed-off-by: Paolo Bonzini > --- > blockdev.c | 133 > -- > hmp-commands.hx | 21 + > hmp.c| 28 +

[Qemu-devel] [PATCH 28/47] qmp: add drive-mirror command

2012-07-24 Thread Paolo Bonzini
This adds the monitor commands that start the mirroring job. Signed-off-by: Paolo Bonzini --- blockdev.c | 133 -- hmp-commands.hx | 21 + hmp.c| 28 hmp.h|1 + qapi-schema.json | 3