Re: [Qemu-block] [Qemu-devel] [PATCH v6 3/9] vdi: Use QEMU UUID API

2016-09-17 Thread Stefan Weil
On 08/17/16 09:28, Fam Zheng wrote: The UUID operations we need from libuuid is fully supported by QEMU UUID implementation. Use it, and remove the unused code. See Eric's annotation. Signed-off-by: Fam Zheng --- block/vdi.c | 73

[Qemu-block] [PATCH v8 11/12] tests: Add uuid tests

2016-09-17 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/Makefile.include | 2 + tests/test-uuid.c | 177 + 2 files changed, 179 insertions(+) create mode 100644 tests/test-uuid.c diff --git a/tests/Makefile.include b/tests/Makefile.include

[Qemu-block] [PATCH v8 07/12] tests: No longer dependent on CONFIG_UUID

2016-09-17 Thread Fam Zheng
crypto now uses built-in uuid implementation, so this check is not needed. Signed-off-by: Fam Zheng Reviewed-by: Eric Blake --- tests/test-crypto-block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-crypto-block.c

[Qemu-block] [PATCH v8 10/12] uuid: Tighten uuid parse

2016-09-17 Thread Fam Zheng
sscanf is relatively loose (tolerate) on some invalid formats that we should fail instead of generating a wrong uuid structure, like with whitespaces and short strings. Add and use a helper function to first check the format. Signed-off-by: Fam Zheng --- util/uuid.c | 24

[Qemu-block] [PATCH v8 09/12] vl: Switch qemu_uuid to QemuUUID

2016-09-17 Thread Fam Zheng
Update all qemu_uuid users as well, especially get rid of the duplicated low level g_strdup_printf, sscanf and snprintf calls with QEMU UUID API. Since qemu_uuid_parse is quite tangled with qemu_uuid, its switching to QemuUUID is done here too to keep everything in sync and avoid code churn.

[Qemu-block] [PATCH v8 04/12] vdi: Use QEMU UUID API

2016-09-17 Thread Fam Zheng
The UUID operations we need from libuuid are fully supported by QEMU UUID implementation. Use it, and remove the unused code. Signed-off-by: Fam Zheng Reviewed-by: Eric Blake --- block/vdi.c | 73 ++---

[Qemu-block] [PATCH v8 12/12] Add UUID files to MAINTAINERS

2016-09-17 Thread Fam Zheng
I understand that we've been keeping eyes on the uncovered files. Since I'm adding some more files I volunteer to look after them in the futuer. Signed-off-by: Fam Zheng --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index

[Qemu-block] [PATCH v8 08/12] configure: Remove detection code for UUID

2016-09-17 Thread Fam Zheng
All code now uses built-in UUID implementation. Remove the code of libuuid and make --enable-uuid and --disable-uuid only print a message. Signed-off-by: Fam Zheng Reviewed-by: Eric Blake --- configure | 43 --- 1 file

[Qemu-block] [PATCH v8 06/12] crypto: Switch to QEMU UUID API

2016-09-17 Thread Fam Zheng
The uuid generation doesn't return error, so update the function signature and calling code accordingly. Signed-off-by: Fam Zheng Reviewed-by: Eric Blake --- crypto/block-luks.c | 26 +++--- 1 file changed, 7 insertions(+), 19

[Qemu-block] [PATCH v8 05/12] vpc: Use QEMU UUID API

2016-09-17 Thread Fam Zheng
Previously we conditionally generated footer->uuid, when libuuid was available. Now that we have a built-in implementation, we can switch to it. Signed-off-by: Fam Zheng Reviewed-by: Eric Blake --- block/vpc.c | 10 +++--- 1 file changed, 3

[Qemu-block] [PATCH v8 02/12] uuid: Make null_uuid static

2016-09-17 Thread Fam Zheng
So that it doesn't have to be zeroed at each call. Suggested-by: Eric Blake Signed-off-by: Fam Zheng --- util/uuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/uuid.c b/util/uuid.c index 6815904..f0c1eeb 100644 --- a/util/uuid.c

[Qemu-block] [PATCH v8 03/12] vhdx: Use QEMU UUID API

2016-09-17 Thread Fam Zheng
This removes our dependency to libuuid, so that the driver can always be built. Similar to how we handled data plane configure options, --enable-vhdx and --disable-vhdx are also changed to a nop with a message saying it's obsolete. Signed-off-by: Fam Zheng Reviewed-by: Eric

[Qemu-block] [PATCH v8 01/12] util: Add UUID API

2016-09-17 Thread Fam Zheng
A number of different places across the code base use CONFIG_UUID. Some of them are soft dependency, some are not built if libuuid is not available, some come with dummy fallback, some throws runtime error. It is hard to maintain, and hard to reason for users. Since UUID is a simple standard

[Qemu-block] [PATCH v8 00/12] UUID clean ups for 2.8

2016-09-17 Thread Fam Zheng
v8: Fix patchew compiling failure on 32 bit mingw, using QEMU_PTR_IS_ALIGNED. v7: Address Eric's comments: 01, 03-09: Add Eric's r-b line. 01: Commit message syntax fix. Remove trailing comma in copyright header. Remove 'glib.h' inclusion. 02: New patch to make

Re: [Qemu-block] [Qemu-devel] [PATCH v7 00/12] UUID clean ups for 2.8

2016-09-17 Thread Fam Zheng
On Sat, 09/17 20:16, no-re...@ec2-52-6-146-230.compute-1.amazonaws.com wrote: > /tmp/qemu-test/src/util/uuid.c: In function 'qemu_uuid_bswap': > /tmp/qemu-test/src/util/uuid.c:110:7: error: cast from pointer to integer of > different size [-Werror=pointer-to-int-cast] >

[Qemu-block] [PATCH v7 12/12] Add UUID files to MAINTAINERS

2016-09-17 Thread Fam Zheng
I understand that we've been keeping eyes on the uncovered files. Since I'm adding some more files I volunteer to look after them in the futuer. Signed-off-by: Fam Zheng --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index

[Qemu-block] [PATCH v7 10/12] uuid: Tighten uuid parse

2016-09-17 Thread Fam Zheng
sscanf is relatively loose (tolerate) on some invalid formats that we should fail instead of generating a wrong uuid structure, like with whitespaces and short strings. Add and use a helper function to first check the format. Signed-off-by: Fam Zheng --- util/uuid.c | 24

[Qemu-block] [PATCH v7 08/12] configure: Remove detection code for UUID

2016-09-17 Thread Fam Zheng
All code now uses built-in UUID implementation. Remove the code of libuuid and make --enable-uuid and --disable-uuid only print a message. Signed-off-by: Fam Zheng Reviewed-by: Eric Blake --- configure | 43 --- 1 file

[Qemu-block] [PATCH v7 06/12] crypto: Switch to QEMU UUID API

2016-09-17 Thread Fam Zheng
The uuid generation doesn't return error, so update the function signature and calling code accordingly. Signed-off-by: Fam Zheng Reviewed-by: Eric Blake --- crypto/block-luks.c | 26 +++--- 1 file changed, 7 insertions(+), 19

[Qemu-block] [PATCH v7 07/12] tests: No longer dependent on CONFIG_UUID

2016-09-17 Thread Fam Zheng
crypto now uses built-in uuid implementation, so this check is not needed. Signed-off-by: Fam Zheng Reviewed-by: Eric Blake --- tests/test-crypto-block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-crypto-block.c

[Qemu-block] [PATCH v7 11/12] tests: Add uuid tests

2016-09-17 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/Makefile.include | 2 + tests/test-uuid.c | 177 + 2 files changed, 179 insertions(+) create mode 100644 tests/test-uuid.c diff --git a/tests/Makefile.include b/tests/Makefile.include

[Qemu-block] [PATCH v7 05/12] vpc: Use QEMU UUID API

2016-09-17 Thread Fam Zheng
Previously we conditionally generated footer->uuid, when libuuid was available. Now that we have a built-in implementation, we can switch to it. Signed-off-by: Fam Zheng Reviewed-by: Eric Blake --- block/vpc.c | 10 +++--- 1 file changed, 3

[Qemu-block] [PATCH v7 03/12] vhdx: Use QEMU UUID API

2016-09-17 Thread Fam Zheng
This removes our dependency to libuuid, so that the driver can always be built. Similar to how we handled data plane configure options, --enable-vhdx and --disable-vhdx are also changed to a nop with a message saying it's obsolete. Signed-off-by: Fam Zheng Reviewed-by: Eric

[Qemu-block] [PATCH v7 02/12] uuid: Make null_uuid static

2016-09-17 Thread Fam Zheng
So that it doesn't have to be zeroed at each call. Suggested-by: Eric Blake Signed-off-by: Fam Zheng --- util/uuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/uuid.c b/util/uuid.c index 08a7fd3..2e47f4a 100644 --- a/util/uuid.c

[Qemu-block] [PATCH v7 09/12] vl: Switch qemu_uuid to QemuUUID

2016-09-17 Thread Fam Zheng
Update all qemu_uuid users as well, especially get rid of the duplicated low level g_strdup_printf, sscanf and snprintf calls with QEMU UUID API. Since qemu_uuid_parse is quite tangled with qemu_uuid, its switching to QemuUUID is done here too to keep everything in sync and avoid code churn.

[Qemu-block] [PATCH v7 00/12] UUID clean ups for 2.8

2016-09-17 Thread Fam Zheng
v7: Address Eric's comments: 01, 03-09: Add Eric's r-b line. 01: Commit message syntax fix. Remove trailing comma in copyright header. Remove 'glib.h' inclusion. 02: New patch to make null_uuid. 09: Fix missed qemu_uuid. Also update "qemu_uuid[]" to

[Qemu-block] [PATCH v7 01/12] util: Add UUID API

2016-09-17 Thread Fam Zheng
A number of different places across the code base use CONFIG_UUID. Some of them are soft dependency, some are not built if libuuid is not available, some come with dummy fallback, some throws runtime error. It is hard to maintain, and hard to reason for users. Since UUID is a simple standard

[Qemu-block] [PATCH v7 04/12] vdi: Use QEMU UUID API

2016-09-17 Thread Fam Zheng
The UUID operations we need from libuuid are fully supported by QEMU UUID implementation. Use it, and remove the unused code. Signed-off-by: Fam Zheng Reviewed-by: Eric Blake --- block/vdi.c | 73 ++---

Re: [Qemu-block] [Qemu-devel] [PATCH v6 1/9] util: Add UUID API

2016-09-17 Thread Fam Zheng
On Sat, 09/17 16:29, Eric Blake wrote: > On 08/17/2016 02:28 AM, Fam Zheng wrote: > > A number of different places across the code base use CONFIG_UUID. Some > > of them are soft dependency, some are not built if libuuid is not > > available, some come with dummy fallback, some throws runtime

Re: [Qemu-block] [PATCH 2/2] aio: improve aio_poll performance by checking epoll only once

2016-09-17 Thread Yaowei Bai
On Wed, Sep 14, 2016 at 05:40:17PM +0100, Stefan Hajnoczi wrote: > On Wed, Sep 14, 2016 at 07:03:39AM -0400, Yaowei Bai wrote: > > As epoll whether enabled or not is a global setting, we can just > > check it only once rather than checking it with every node iteration. > > Through this we can

[Qemu-block] [PULL v2 8/8] iotest 055: refactor and speed up

2016-09-17 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Source disk is created and filled with test data before each test case. Instead initialize it once for the whole unit. Test disk filling patterns are merged into one pattern. Also TestSetSpeed used different image_len for source and

[Qemu-block] [PULL v2 7/8] commit: get the overlay node before manipulating the backing chain

2016-09-17 Thread Max Reitz
From: Alberto Garcia The 'block-commit' command has a 'top' parameter to specify the topmost node from which the data is going to be copied. [E] <- [D] <- [C] <- [B] <- [A] In this case if [C] is the top node then this is the result: [E] <- [B] <- [A] [B] must be

[Qemu-block] [PULL v2 6/8] blockdev: Modularize nfs block driver

2016-09-17 Thread Max Reitz
From: Colin Lord Modularizes the nfs block driver so that it gets dynamically loaded. Signed-off-by: Colin Lord Reviewed-by: Stefan Hajnoczi Message-id: 1471008424-16465-5-git-send-email-cl...@redhat.com Reviewed-by: Max Reitz

[Qemu-block] [PULL v2 5/8] blockdev: Add dynamic module loading for block drivers

2016-09-17 Thread Max Reitz
From: Marc Mari Extend the current module interface to allow for block drivers to be loaded dynamically on request. The only block drivers that can be converted into modules are the drivers that don't perform any init operation except for registering themselves. In addition,

[Qemu-block] [PULL v2 4/8] blockdev: Add dynamic generation of module_block.h

2016-09-17 Thread Max Reitz
From: Marc Mari To simplify the addition of new block modules, add a script that generates module_block.h automatically from the modules' source code. This script assumes that the QEMU coding style rules are followed. Signed-off-by: Marc MarĂ­

[Qemu-block] [PULL v2 0/8] Block layer patches

2016-09-17 Thread Max Reitz
The following changes since commit e3571ae30cd26d19efd4554c25e32ef64d6a36b3: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20160916' into staging (2016-09-16 16:54:50 +0100) are available in the git repository at: git://github.com/XanClic/qemu.git tags/pull-block-2016-09-17 for

[Qemu-block] [PULL v2 3/8] blockdev: prepare iSCSI block driver for dynamic loading

2016-09-17 Thread Max Reitz
From: Colin Lord This commit moves the initialization of the QemuOptsList qemu_iscsi_opts struct out of block/iscsi.c in order to allow the iscsi module to be dynamically loaded. Signed-off-by: Colin Lord Reviewed-by: Fam Zheng Reviewed-by:

[Qemu-block] [PULL v2 1/8] qemu-img: add the 'dd' subcommand

2016-09-17 Thread Max Reitz
From: Reda Sallahi This patch adds a basic dd subcommand analogous to dd(1) to qemu-img. For the start, this implements the bs, if, of and count options and requires both if and of to be specified (no stdin/stdout if not specified) and doesn't support tty, pipes, etc. The

Re: [Qemu-block] [Qemu-devel] [PATCH v6 9/9] tests: Add uuid tests

2016-09-17 Thread Eric Blake
On 08/17/2016 02:28 AM, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > tests/Makefile.include | 2 + > tests/test-uuid.c | 173 > + > 2 files changed, 175 insertions(+) > create mode 100644 tests/test-uuid.c > > +

Re: [Qemu-block] [Qemu-devel] [PATCH v6 8/9] vl: Switch qemu_uuid to QemuUUID

2016-09-17 Thread Eric Blake
On 09/17/2016 04:38 PM, Eric Blake wrote: > On 08/17/2016 02:28 AM, Fam Zheng wrote: >> Update all qemu_uuid users as well, especially get rid of the duplicated >> low level g_strdup_printf, sscanf and snprintf calls with QEMU UUID API. >> >> Since qemu_uuid_parse is quite tangled with qemu_uuid,

Re: [Qemu-block] [Qemu-devel] [PATCH v6 8/9] vl: Switch qemu_uuid to QemuUUID

2016-09-17 Thread Eric Blake
On 08/17/2016 02:28 AM, Fam Zheng wrote: > Update all qemu_uuid users as well, especially get rid of the duplicated > low level g_strdup_printf, sscanf and snprintf calls with QEMU UUID API. > > Since qemu_uuid_parse is quite tangled with qemu_uuid, it's switching to > QemuUUID is done here too

Re: [Qemu-block] [Qemu-devel] [PATCH v6 7/9] configure: Remove detection code for UUID

2016-09-17 Thread Eric Blake
On 08/17/2016 02:28 AM, Fam Zheng wrote: > All code now uses built-in UUID implementation. Remove the code of > libuuid and make --enable-uuid and --disable-uuid only print a message. > > Signed-off-by: Fam Zheng > --- > configure | 43

Re: [Qemu-block] [Qemu-devel] [PATCH v6 5/9] crypto: Switch to QEMU UUID API

2016-09-17 Thread Eric Blake
On 08/17/2016 02:28 AM, Fam Zheng wrote: > The uuid generation doesn't return error, so update the function > signature and calling code accordingly. > > Signed-off-by: Fam Zheng > --- > crypto/block-luks.c | 26 +++--- > 1 file changed, 7 insertions(+), 19

Re: [Qemu-block] [Qemu-devel] [PATCH v6 4/9] vpc: Use QEMU UUID API

2016-09-17 Thread Eric Blake
On 08/17/2016 02:28 AM, Fam Zheng wrote: > Previously we conditionally generated footer->uuid, when libuuid was > available. Now that we have a built-in implementation, we can switch to > it. > > Signed-off-by: Fam Zheng > --- > block/vpc.c | 10 +++--- > 1 file changed, 3

Re: [Qemu-block] [PATCH v8 07/10] hbitmap: serialization

2016-09-17 Thread Max Reitz
On 02.08.2016 02:12, John Snow wrote: > 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.

Re: [Qemu-block] [Qemu-devel] [PATCH v6 3/9] vdi: Use QEMU UUID API

2016-09-17 Thread Eric Blake
On 08/17/2016 02:28 AM, Fam Zheng wrote: > The UUID operations we need from libuuid is fully supported by QEMU UUID s/is/are/ > implementation. Use it, and remove the unused code. > > Signed-off-by: Fam Zheng > --- > block/vdi.c | 73 >

Re: [Qemu-block] [PULL 00/18] Block layer patches

2016-09-17 Thread Max Reitz
On 15.09.2016 18:10, Peter Maydell wrote: > On 14 September 2016 at 17:40, Max Reitz wrote: >> The following changes since commit 507e4ddc3abf67391bcbc9624fd60b969c159b78: >> >> Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-fetch' into >> staging (2016-09-13

Re: [Qemu-block] [Qemu-devel] [PATCH v6 2/9] vhdx: Use QEMU UUID API

2016-09-17 Thread Eric Blake
On 08/17/2016 02:28 AM, Fam Zheng wrote: > This removes our dependency to libuuid, so that the driver can always be > built. > > Similar to how we handled data plane configure options, --enable-vhdx > and --disable-vhdx are also changed to a nop with a message saying it's > obsolete. > >

Re: [Qemu-block] [Qemu-devel] [PATCH v6 1/9] util: Add UUID API

2016-09-17 Thread Eric Blake
On 08/17/2016 02:28 AM, Fam Zheng wrote: > A number of different places across the code base use CONFIG_UUID. Some > of them are soft dependency, some are not built if libuuid is not > available, some come with dummy fallback, some throws runtime error. > > It is hard to maintain, and hard to