Re: [Qemu-block] [RFC PATCH COLO v2 01/13] docs: block replication's description

2015-04-02 Thread Wen Congyang
On 03/26/2015 02:31 PM, Fam Zheng wrote: On Wed, 03/25 17:36, Wen Congyang wrote: Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Yang Hongyang yan...@cn.fujitsu.com Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com

Re: [Qemu-block] [Qemu-devel] [PATCH v4 08/20] block: Add bitmap disabled status

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:16:51PM -0400, John Snow wrote: Add a status indicating the enabled/disabled state of the bitmap. A bitmap is by default enabled, but you can lock the bitmap into a read-only state by setting disabled = true. A previous version of this patch added a QMP interface

Re: [Qemu-block] [PATCH v4 10/20] qmp: Add support of dirty-bitmap sync mode for drive-backup

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:16:53PM -0400, John Snow wrote: +} else if (job-sync_mode == MIRROR_SYNC_MODE_DIRTY_BITMAP) { +/* Dirty Bitmap sync has a slightly different iteration method */ +HBitmapIter hbi; +int64_t sector; +int64_t cluster; +

Re: [Qemu-block] block-commit dropping privs

2015-04-02 Thread Eric Blake
On 04/02/2015 06:04 AM, Michael Tokarev wrote: 02.04.2015 14:24, Kevin Wolf wrote: [] But overall, I think qemu-system should not modify backing file name in this case. So you would leave the backing file with the data that you just committed down one level in your backing file chain?

Re: [Qemu-block] [PATCH v4 11/20] qmp: add block-dirty-bitmap-clear

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:16:54PM -0400, John Snow wrote: Add bdrv_clear_dirty_bitmap and a matching QMP command, qmp_block_dirty_bitmap_clear that enables a user to reset the bitmap attached to a drive. This allows us to reset a bitmap in the event of a full drive backup.

Re: [Qemu-block] [PATCH v4 14/20] block: Ensure consistent bitmap function prototypes

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:16:57PM -0400, John Snow wrote: We often don't need the BlockDriverState for functions that operate on bitmaps. Remove it. Signed-off-by: John Snow js...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com --- block.c | 13 ++---

Re: [Qemu-block] [Qemu-devel] [PATCH v4 12/20] qmp: Add dirty bitmap status field in query-block

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:16:55PM -0400, John Snow wrote: Add the frozen status booleans, to inform clients when a bitmap is occupied doing a task. Signed-off-by: Fam Zheng f...@redhat.com Signed-off-by: John Snow js...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com --- block.c

Re: [Qemu-block] [PATCH v4 07/20] hbitmap: add hbitmap_merge

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:16:50PM -0400, John Snow wrote: We add a bitmap merge operation to assist in error cases where we wish to combine two bitmaps together. This is algorithmically O(bits) provided HBITMAP_LEVELS remains constant. For a full bitmap on a 64bit machine: sum(bits/64^k,

Re: [Qemu-block] [PATCH v4 13/20] block: add BdrvDirtyBitmap documentation

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:16:56PM -0400, John Snow wrote: Signed-off-by: John Snow js...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com --- block.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpSgc0g1v0CF.pgp

Re: [Qemu-block] block-commit dropping privs

2015-04-02 Thread Kevin Wolf
Am 02.04.2015 um 12:58 hat Michael Tokarev geschrieben: 01.04.2015 15:34, Kevin Wolf wrote: [] Overriding the backing file should work like this: -drive file=...,backing.file.filename=/dev/fdset/2 Oh-ok, this works. Sort of. Because after performing commit (is there a

Re: [Qemu-block] [Qemu-devel] block-commit dropping privs

2015-04-02 Thread Jeff Cody
On Thu, Apr 02, 2015 at 01:24:02PM +0200, Kevin Wolf wrote: Am 02.04.2015 um 12:58 hat Michael Tokarev geschrieben: 01.04.2015 15:34, Kevin Wolf wrote: [] Overriding the backing file should work like this: -drive file=...,backing.file.filename=/dev/fdset/2 Oh-ok, this

Re: [Qemu-block] [RFC PATCH COLO v2 01/13] docs: block replication's description

2015-04-02 Thread Fam Zheng
On Fri, 04/03 10:35, Wen Congyang wrote: On 03/26/2015 02:31 PM, Fam Zheng wrote: On Wed, 03/25 17:36, Wen Congyang wrote: Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Yang Hongyang yan...@cn.fujitsu.com Signed-off-by:

Re: [Qemu-block] [PATCH v4 15/20] block: Resize bitmaps on bdrv_truncate

2015-04-02 Thread John Snow
On 04/02/2015 09:37 AM, Stefan Hajnoczi wrote: On Fri, Mar 20, 2015 at 03:16:58PM -0400, John Snow wrote: +void hbitmap_truncate(HBitmap *hb, uint64_t size) +{ +bool shrink; +unsigned i; +uint64_t num_elements = size; +uint64_t old; + +/* Size comes in as logical elements,

[Qemu-block] [RFC] Intermediate block mirroring

2015-04-02 Thread Alberto Garcia
Hi, I'm interested in adding the possibility to mirror an intermediate node in a disk image chain, but I would like to have some feedback before sending any patches. The goal would be to convert this: [A] - [B] - [C] - [D] into this: [A] - [B] - [X] - [D] where [D] is the active image

Re: [Qemu-block] [PATCH v4 17/20] iotests: add invalid input incremental backup tests

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:17:00PM -0400, John Snow wrote: Signed-off-by: John Snow js...@redhat.com --- tests/qemu-iotests/124 | 104 + tests/qemu-iotests/124.out | 5 +++ tests/qemu-iotests/group | 1 + 3 files changed, 110

Re: [Qemu-block] [PATCH v4 16/20] hbitmap: truncate tests

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:16:59PM -0400, John Snow wrote: The general approach is to set bits close to the boundaries of where we are truncating and ensure that everything appears to have gone OK. We test growing and shrinking by different amounts: - Less than the granularity - Less than

Re: [Qemu-block] [Qemu-devel] [PATCH v4 19/20] iotests: add simple incremental backup case

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:17:02PM -0400, John Snow wrote: Signed-off-by: John Snow js...@redhat.com --- tests/qemu-iotests/124 | 153 + tests/qemu-iotests/124.out | 4 +- 2 files changed, 155 insertions(+), 2 deletions(-) diff --git

Re: [Qemu-block] [PATCH v4 20/20] iotests: add incremental backup failure recovery test

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:17:03PM -0400, John Snow wrote: Test the failure case for incremental backups. Signed-off-by: John Snow js...@redhat.com --- blockdev.c | 1 - tests/qemu-iotests/124 | 55 ++

Re: [Qemu-block] [PATCH v4 15/20] block: Resize bitmaps on bdrv_truncate

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:16:58PM -0400, John Snow wrote: +void hbitmap_truncate(HBitmap *hb, uint64_t size) +{ +bool shrink; +unsigned i; +uint64_t num_elements = size; +uint64_t old; + +/* Size comes in as logical elements, adjust for granularity. */ +size =

Re: [Qemu-block] [PATCH v4 18/20] iotests: add QMP event waiting queue

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:17:01PM -0400, John Snow wrote: +# Test if 'match' is a recursive subset of 'event' +def event_match(event, match = None): Not worth respinning but PEP8 says there should be no spaces around the '=' for keyword arguments:

Re: [Qemu-block] [PATCH v4 00/20] block: transactionless incremental backup series

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:16:43PM -0400, John Snow wrote: I've run out of cheeky jokes for my cover letters. This patchset enables the in-memory part of the incremental backup feature, without transactional support. Support for transactions was separated into a separate series which is

Re: [Qemu-block] [PATCH v4 18/20] iotests: add QMP event waiting queue

2015-04-02 Thread John Snow
On 04/02/2015 09:57 AM, Stefan Hajnoczi wrote: On Fri, Mar 20, 2015 at 03:17:01PM -0400, John Snow wrote: +# Test if 'match' is a recursive subset of 'event' +def event_match(event, match = None): Not worth respinning but PEP8 says there should be no spaces around the '=' for keyword

Re: [Qemu-block] [Qemu-devel] [RFC] Intermediate block mirroring

2015-04-02 Thread Eric Blake
On 04/02/2015 07:28 AM, Alberto Garcia wrote: Hi, I'm interested in adding the possibility to mirror an intermediate node in a disk image chain, but I would like to have some feedback before sending any patches. The goal would be to convert this: [A] - [B] - [C] - [D] into this:

Re: [Qemu-block] [PATCH v4 10/20] qmp: Add support of dirty-bitmap sync mode for drive-backup

2015-04-02 Thread John Snow
On 04/02/2015 08:44 AM, Stefan Hajnoczi wrote: On Fri, Mar 20, 2015 at 03:16:53PM -0400, John Snow wrote: +} else if (job-sync_mode == MIRROR_SYNC_MODE_DIRTY_BITMAP) { +/* Dirty Bitmap sync has a slightly different iteration method */ +HBitmapIter hbi; +int64_t