Re: [Qemu-block] [PATCH v4 11/14] vmdk: Return extent's file in bdrv_get_block_status

2016-01-04 Thread Fam Zheng
On Mon, 01/04 21:48, Max Reitz wrote: > On 24.12.2015 06:50, Fam Zheng wrote: > > Reviewed-by: Stefan Hajnoczi > > Signed-off-by: Fam Zheng > > --- > > block/vmdk.c | 11 +-- > > 1 file changed, 5 insertions(+), 6 deletions(-) > > > > diff --git a/block/vmdk.c b/block/vmdk.c > > index f

Re: [Qemu-block] [PATCH v4 01/14] block: Add "file" output parameter to block status query functions

2016-01-04 Thread Fam Zheng
On Mon, 01/04 22:00, Max Reitz wrote: > On 24.12.2015 06:50, Fam Zheng wrote: > > The added parameter can be used to return the BDS pointer which the > > valid offset is referring to. It's value should be ignored unless > > *Its > > > BDRV_BLOCK_OFFSET_VALID in ret is set. > > > > Until block dr

Re: [Qemu-block] [Qemu-devel] [PATCH v5 4/6] expose floppy drive geometry and CMOS type

2016-01-04 Thread Michael S. Tsirkin
On Mon, Jan 04, 2016 at 03:44:42PM -0500, John Snow wrote: > > > On 12/30/2015 03:11 PM, Roman Kagan wrote: > > Make it possible to query the geometry and the CMOS type of a floppy > > drive outside of the respective source files. > > > > It will be useful, in particular, when dynamically buildi

Re: [Qemu-block] [PATCH v4 00/14] qemu-img map: Allow driver to return file of the allocated block

2016-01-04 Thread Max Reitz
On 24.12.2015 06:50, Fam Zheng wrote: > v4: Rebase and resend, adding Eric's and Stefan's reviewed-by. > > Fix one typo in patch 13. > > Drop previous patch 14 for a later rework because it is not a hard > requirement, but it is pending on Eric's QAPI-to-JSON visitor series: > >

Re: [Qemu-block] [PATCH v4 01/14] block: Add "file" output parameter to block status query functions

2016-01-04 Thread Max Reitz
On 24.12.2015 06:50, Fam Zheng wrote: > The added parameter can be used to return the BDS pointer which the > valid offset is referring to. It's value should be ignored unless *Its > BDRV_BLOCK_OFFSET_VALID in ret is set. > > Until block drivers fill in the right value, let's clear it explicitly

Re: [Qemu-block] [PATCH v4 11/14] vmdk: Return extent's file in bdrv_get_block_status

2016-01-04 Thread Max Reitz
On 24.12.2015 06:50, Fam Zheng wrote: > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Fam Zheng > --- > block/vmdk.c | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/block/vmdk.c b/block/vmdk.c > index f5a56fd..b60a5af 100644 > --- a/block/vmdk.c > +++ b/bloc

Re: [Qemu-block] [Qemu-devel] [PATCH v5 4/6] expose floppy drive geometry and CMOS type

2016-01-04 Thread John Snow
On 12/30/2015 03:11 PM, Roman Kagan wrote: > Make it possible to query the geometry and the CMOS type of a floppy > drive outside of the respective source files. > > It will be useful, in particular, when dynamically building ACPI tables, > and will allow to properly populate the corresponding A

Re: [Qemu-block] [PATCH v4 4/5] qmp: Add blockdev-mirror command

2016-01-04 Thread Max Reitz
On 24.12.2015 05:45, Fam Zheng wrote: > This will start a mirror job from a named device to another named > device, its relation with drive-mirror is similar with blockdev-backup > to drive-backup. > > In blockdev-mirror, the target node should be prepared by blockdev-add, > which will be responsi

Re: [Qemu-block] [PATCH v3 4/5] qmp: Add blockdev-mirror command

2016-01-04 Thread Max Reitz
On 24.12.2015 04:25, Fam Zheng wrote: > On Thu, 12/24 01:53, Max Reitz wrote: >> On 23.12.2015 06:59, Fam Zheng wrote: >>> This will start a mirror job from a named device to another named >>> device, its relation with drive-mirror is similar with blockdev-backup >>> to drive-backup. >>> >>> In blo

Re: [Qemu-block] [PATCH v8 1/2] mirror: Rewrite mirror_iteration

2016-01-04 Thread Max Reitz
On 24.12.2015 04:15, Fam Zheng wrote: > The "pnum < nb_sectors" condition in deciding whether to actually copy > data is unnecessarily strict, and the qiov initialization is > unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard. > > Rewrite mirror_iteration to fix both flaws. > > Signed-

Re: [Qemu-block] [Qemu-devel] [PATCH 00/10] qcow2: Implement image locking

2016-01-04 Thread Max Reitz
On 24.12.2015 06:41, Denis V. Lunev wrote: > On 12/24/2015 02:19 AM, Max Reitz wrote: >> So the benefits of a qcow2 flag are only minor ones. However, I >> personally believe that automatic unlock on crash is a very minor >> benefit as well. That should never happen in practice anyway, and a >> cra

Re: [Qemu-block] ping Re: [PATCH v12] block/raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2016-01-04 Thread Programmingkid
On Jan 4, 2016, at 11:35 AM, Max Reitz wrote: > On 29.12.2015 01:27, Programmingkid wrote: >> I do realize you are busy Kevin, but I would >> appreciate knowing my patch is in line >> for review. > > Primarily, he's been on holiday since before christmas until next week. > > (I'm telling you s

Re: [Qemu-block] ping Re: [PATCH v12] block/raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2016-01-04 Thread Max Reitz
On 29.12.2015 01:27, Programmingkid wrote: > I do realize you are busy Kevin, but I would > appreciate knowing my patch is in line > for review. Primarily, he's been on holiday since before christmas until next week. (I'm telling you so you don't wonder why nothing happens.) Max signature.as

Re: [Qemu-block] [Patch v12 resend 00/10] Block replication for continuous checkpoints

2016-01-04 Thread Dr. David Alan Gilbert
* Wen Congyang (we...@cn.fujitsu.com) wrote: > On 12/23/2015 06:04 PM, Stefan Hajnoczi wrote: > > On Thu, Dec 17, 2015 at 02:22:14PM +0800, Wen Congyang wrote: > >> Stefan:Ping... > >> > >> What about this feature? I have worked for it about 1 year, but it is > >> still in the > >> way... > > > >

Re: [Qemu-block] [Patch v12 resend 05/10] docs: block replication's description

2016-01-04 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Wed, Dec 02, 2015 at 01:31:46PM +0800, Wen Congyang wrote: > > +== Failure Handling == > > +There are 6 internal errors when block replication is running: > > +1. I/O error on primary disk > > +2. Forwarding primary write requests failed > > +3. B

[Qemu-block] [PATCH 06/13] HBitmap: Introduce "meta" bitmap to track bit changes

2016-01-04 Thread Fam Zheng
Upon each bit toggle, the corresponding bit in the meta bitmap will be set. Signed-off-by: Fam Zheng --- include/qemu/hbitmap.h | 8 +++ util/hbitmap.c | 61 +- 2 files changed, 54 insertions(+), 15 deletions(-) diff --git a/include/q

[Qemu-block] [PATCH 12/13] block: BdrvDirtyBitmap serialization interface

2016-01-04 Thread Fam Zheng
From: Vladimir Sementsov-Ogievskiy Several functions to provide necessary access to BdrvDirtyBitmap for block-migration.c Signed-off-by: Vladimir Sementsov-Ogievskiy [Add the "finish" parameters. - Fam] Signed-off-by: Fam Zheng --- block/dirty-bitmap.c | 37 +++

[Qemu-block] [PATCH 11/13] hbitmap: serialization

2016-01-04 Thread Fam Zheng
From: Vladimir Sementsov-Ogievskiy Functions to serialize / deserialize(restore) HBitmap. HBitmap should be saved to linear sequence of bits independently of endianness and bitmap array element (unsigned long) size. Therefore Little Endian is chosen. These functions are appropriate for dirty bit

[Qemu-block] [PATCH 03/13] block: Move block dirty bitmap code to separate files

2016-01-04 Thread Fam Zheng
The only change is making bdrv_dirty_bitmap_truncate public. It is used in block.c. Signed-off-by: Fam Zheng --- block.c | 339 --- block/Makefile.objs | 2 +- block/dirty-bitmap.c | 366 +

[Qemu-block] [PATCH 13/13] tests: Add test code for hbitmap serialization

2016-01-04 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/test-hbitmap.c | 139 +++ 1 file changed, 139 insertions(+) diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c index 19136e7..4f61961 100644 --- a/tests/test-hbitmap.c +++ b/tests/test-hbitmap.c @@ -14,6 +14

[Qemu-block] [PATCH 05/13] block: Hide HBitmap in block dirty bitmap interface

2016-01-04 Thread Fam Zheng
HBitmap is an implementation detail of block dirty bitmap that should be hidden from users. Introduce a BdrvDirtyBitmapIter to encapsulate the underlying HBitmapIter. A small difference in the interface is, before, an HBitmapIter is initialized in place, now the new BdrvDirtyBitmapIter must be dyn

[Qemu-block] [PATCH 10/13] block: Assert that bdrv_release_dirty_bitmap succeeded

2016-01-04 Thread Fam Zheng
This makes sure we don't leak a dirty bitmap in any case. Signed-off-by: Fam Zheng --- block/dirty-bitmap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index 9cac794..60ee965 100644 --- a/block/dirty-bitmap.c +++ b/block/dirty-bitmap.c @@ -297,

[Qemu-block] [PATCH 07/13] tests: Add test code for meta bitmap

2016-01-04 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/test-hbitmap.c | 113 +++ 1 file changed, 113 insertions(+) diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c index abcea0c..19136e7 100644 --- a/tests/test-hbitmap.c +++ b/tests/test-hbitmap.c @@ -14,6 +14

[Qemu-block] [PATCH 04/13] block: Remove unused typedef of BlockDriverDirtyHandler

2016-01-04 Thread Fam Zheng
Signed-off-by: Fam Zheng --- include/block/block.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/block/block.h b/include/block/block.h index 97e9b5e..0f42964 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -320,8 +320,6 @@ BlockDriverState *check_to_replace_node(B

[Qemu-block] [PATCH 09/13] block: Add two dirty bitmap getters

2016-01-04 Thread Fam Zheng
For dirty bitmap users to get the size and the name of a BdrvDirtyBitmap. Signed-off-by: Fam Zheng --- block/dirty-bitmap.c | 10 ++ include/block/dirty-bitmap.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index 4314659..9c

[Qemu-block] [PATCH 08/13] block: Support meta dirty bitmap

2016-01-04 Thread Fam Zheng
The added group of operations enables tracking of the changed bits in the dirty bitmap. Signed-off-by: Fam Zheng --- block/dirty-bitmap.c | 51 include/block/dirty-bitmap.h | 9 2 files changed, 60 insertions(+) diff --git a/block/d

[Qemu-block] [PATCH 01/13] backup: Use Bitmap to replace "s->bitmap"

2016-01-04 Thread Fam Zheng
"s->bitmap" tracks done sectors, we only check bit states without using any iterator which HBitmap is good for. Switch to "Bitmap" which is simpler and more memory efficient. Meanwhile, rename it to done_bitmap, to reflect the intention. Signed-off-by: Fam Zheng Reviewed-by: John Snow --- bloc

[Qemu-block] [PATCH 00/13] Dirty bitmap changes for migration/persistence work

2016-01-04 Thread Fam Zheng
Two major features are added to block dirty bitmap (and underlying HBitmap) in this series: meta bitmap and serialization, together with all other supportive patches. Both operations are common in dirty bitmap migration and persistence: they need to find whether and which part of the dirty bitmap

[Qemu-block] [PATCH 02/13] typedefs: Add BdrvDirtyBitmap and HBitmapIter

2016-01-04 Thread Fam Zheng
Following patches to refactor and move block dirty bitmap code could use this. Signed-off-by: Fam Zheng --- include/qemu/typedefs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 78fe6e8..e83934e 100644 --- a/include/qemu/typedefs.h