Re: [Qemu-block] [PATCH 06/29] qcow2-bitmap: add qcow2_read_bitmaps()

2016-08-11 Thread Kevin Wolf
Am 11.08.2016 um 14:00 hat Vladimir Sementsov-Ogievskiy geschrieben: > On 11.08.2016 12:36, Kevin Wolf wrote: > >Am 08.08.2016 um 17:04 hat Vladimir Sementsov-Ogievskiy geschrieben: > >>Add qcow2_read_bitmaps, reading bitmap directory as specified in > >>docs/specs/qcow2.txt > >> >

Re: [Qemu-block] [PATCH 16/29] block: add bdrv_load_dirty_bitmap()

2016-08-11 Thread Vladimir Sementsov-Ogievskiy
On 11.08.2016 14:24, Kevin Wolf wrote: Am 08.08.2016 um 17:05 hat Vladimir Sementsov-Ogievskiy geschrieben: The funcion loads dirty bitmap from file, using underlying driver function. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 16

Re: [Qemu-block] [PATCH 07/29] qcow2-bitmap: add qcow2_bitmap_load()

2016-08-11 Thread Kevin Wolf
Am 08.08.2016 um 17:04 hat Vladimir Sementsov-Ogievskiy geschrieben: > This function loads block dirty bitmap from qcow2. > > Signed-off-by: Vladimir Sementsov-Ogievskiy As you said this is really unused at the moment, I'll mostly skip this patch. Just one thing: >

Re: [Qemu-block] [PATCH 06/29] qcow2-bitmap: add qcow2_read_bitmaps()

2016-08-11 Thread Vladimir Sementsov-Ogievskiy
On 11.08.2016 12:36, Kevin Wolf wrote: Am 08.08.2016 um 17:04 hat Vladimir Sementsov-Ogievskiy geschrieben: Add qcow2_read_bitmaps, reading bitmap directory as specified in docs/specs/qcow2.txt Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-bitmap.c |

[Qemu-block] [PATCH v2] qemu-img: change opening method for the output in dd

2016-08-11 Thread Reda Sallahi
dd was creating an output image regardless of whether there was one already created. With this patch we try to open first the output image and resize it if necessary. We also make it mandatory to specify conv=notrunc when the file already exists. Signed-off-by: Reda Sallahi

Re: [Qemu-block] [PATCH 16/29] block: add bdrv_load_dirty_bitmap()

2016-08-11 Thread Kevin Wolf
Am 08.08.2016 um 17:05 hat Vladimir Sementsov-Ogievskiy geschrieben: > The funcion loads dirty bitmap from file, using underlying driver > function. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/dirty-bitmap.c | 16 >

Re: [Qemu-block] [PATCH 08/29] qcow2-bitmap: delete bitmap from qcow2 after load

2016-08-11 Thread Kevin Wolf
Am 08.08.2016 um 17:04 hat Vladimir Sementsov-Ogievskiy geschrieben: > If we load bitmap for r/w bds, it's data in the image should be > considered inconsistent from this point. Therefore it is safe to remove > it from the image. > > Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: [Qemu-block] [Qemu-devel] [PATCH v7 3/4] blockdev: Add dynamic module loading for block drivers

2016-08-11 Thread Colin Lord
On 08/10/2016 11:23 PM, Fam Zheng wrote: > On Wed, 08/10 21:06, Max Reitz wrote: >> On 10.08.2016 21:04, Colin Lord wrote: >>> On 08/10/2016 02:37 PM, Max Reitz wrote: On 08.08.2016 20:07, Colin Lord wrote: > From: Marc Mari > > Extend the current module

Re: [Qemu-block] [PATCH 0/2] coroutine: Assertions and debugging aids

2016-08-11 Thread Paolo Bonzini
> A while ago we were debugging a hang where coroutines were waiting for a > mutex > to be unlocked, but we couldn't find out who held the lock. This series adds > some information to Coroutine and CoMutex that both allows to add a few > assertions to check locking behaviour and can be used to

[Qemu-block] [PATCH 0/2] coroutine: Assertions and debugging aids

2016-08-11 Thread Kevin Wolf
A while ago we were debugging a hang where coroutines were waiting for a mutex to be unlocked, but we couldn't find out who held the lock. This series adds some information to Coroutine and CoMutex that both allows to add a few assertions to check locking behaviour and can be used to find the

[Qemu-block] [PATCH 2/2] coroutine: Assert that no locks are held on termination

2016-08-11 Thread Kevin Wolf
A coroutine that takes a lock must also release it again. If the coroutine terminates without having released all its locks, it's buggy and we'll probably run into a deadlock sooner or later. Make sure that we don't get such cases. Signed-off-by: Kevin Wolf ---

[Qemu-block] [PATCH 1/2] coroutine: Let CoMutex remember who holds it

2016-08-11 Thread Kevin Wolf
In cases of deadlocks, knowing who holds a given CoMutex is really helpful for debugging. Keeping the information around doesn't cost much and allows us to add another assertion to keep the code correct, so let's just add it. Signed-off-by: Kevin Wolf ---

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

2016-08-11 Thread Richard Henderson
On 08/11/2016 05:50 AM, Fam Zheng wrote: +void qemu_uuid_bswap(QemuUUID *uuid) +{ +bswap32s((uint32_t *)>data[0]); +bswap16s((uint16_t *)>data[4]); +bswap16s((uint16_t *)>data[6]); +} You have alignment problems here too. Perhaps you really did want to add uint32_t (and

Re: [Qemu-block] [Qemu-devel] [PATCH v7 3/4] blockdev: Add dynamic module loading for block drivers

2016-08-11 Thread Fam Zheng
On Thu, 08/11 12:03, Colin Lord wrote: > On 08/10/2016 11:23 PM, Fam Zheng wrote: > > On Wed, 08/10 21:06, Max Reitz wrote: > >> On 10.08.2016 21:04, Colin Lord wrote: > >>> On 08/10/2016 02:37 PM, Max Reitz wrote: > On 08.08.2016 20:07, Colin Lord wrote: > > From: Marc Mari

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

2016-08-11 Thread Fam Zheng
On Thu, 08/11 23:21, Richard Henderson wrote: > On 08/11/2016 05:50 AM, Fam Zheng wrote: > >+void qemu_uuid_bswap(QemuUUID *uuid) > >+{ > >+bswap32s((uint32_t *)>data[0]); > >+bswap16s((uint16_t *)>data[4]); > >+bswap16s((uint16_t *)>data[6]); > >+} > > You have alignment problems

Re: [Qemu-block] [Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8

2016-08-11 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Message-id: 1470977536-18209-1-git-send-email-f...@redhat.com Subject: [Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8

Re: [Qemu-block] [PATCH v2] qemu-img: add conv=notrunc option to dd

2016-08-11 Thread Stefan Hajnoczi
On Thu, Aug 11, 2016 at 05:51:43AM +0200, Reda Sallahi wrote: > @@ -3997,6 +4017,14 @@ static int img_dd(int argc, char **argv) > g_free(arg); > arg = NULL; > } > +if (!(dd.conv & C_NOTRUNC)) { > +/* We make conv=notrunc mandatory for the moment to avoid

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-img: change opening method for the output in dd

2016-08-11 Thread Stefan Hajnoczi
On Thu, Aug 11, 2016 at 06:02:32AM +0200, Reda Sallahi wrote: > +bs = bdrv_open(out.filename, NULL, qoptions, BDRV_O_RDWR, _err); Why are bdrv_*() functions used instead of blk_*()? signature.asc Description: PGP signature

Re: [Qemu-block] [PATCH 05/29] qcow2-bitmap: structs and consts

2016-08-11 Thread Kevin Wolf
Am 08.08.2016 um 17:04 hat Vladimir Sementsov-Ogievskiy geschrieben: > Create block/qcow2-bitmap.c > Add data structures and constraints accordingly to docs/specs/qcow2.txt > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/Makefile.objs | 2 +- >

[Qemu-block] [PATCH v3] qemu-img: add conv=notrunc option to dd

2016-08-11 Thread Reda Sallahi
This adds the conv=notrunc option to dd which tells dd to not truncate the output. Signed-off-by: Reda Sallahi --- Depends on: [PATCH v5] qemu-img: add skip option to dd Changes from v2: * Delete the mandatory conv=notrunc Changes from v1: * Added comment qemu-img-cmds.hx

Re: [Qemu-block] [PATCH] test-coroutine: Fix coroutine pool corruption

2016-08-11 Thread Stefan Hajnoczi
On Wed, Aug 10, 2016 at 01:17:27PM +0200, Kevin Wolf wrote: > The test case overwrites the Coroutine object with 0xff as a way to > assert that the coroutine isn't used any more. However, this means that > the coroutine pool now contains a corrupted object and later test cases > may get this

Re: [Qemu-block] [PATCH 06/29] qcow2-bitmap: add qcow2_read_bitmaps()

2016-08-11 Thread Kevin Wolf
Am 08.08.2016 um 17:04 hat Vladimir Sementsov-Ogievskiy geschrieben: > Add qcow2_read_bitmaps, reading bitmap directory as specified in > docs/specs/qcow2.txt > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/qcow2-bitmap.c | 100 >

[Qemu-block] [PATCH v5 2/9] vhdx: Use QEMU UUID API

2016-08-11 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 ---

[Qemu-block] [PATCH v5 0/9] UUID clean ups for 2.8

2016-08-11 Thread Fam Zheng
v5: Add union fields in QemuUUID to help the alignment necessary for bswap, and assert. [Richard] Update the test case initializer syntax accordingly. v4: Use memcpy instead of pointer type cast. [Richard] Keep parameter order consistent with libuuid. [Jeff] qemu_uuid_convert ->

[Qemu-block] [PATCH v5 1/9] util: Add UUID API

2016-08-11 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 v5 4/9] vpc: Use QEMU UUID API

2016-08-11 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 --- block/vpc.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/block/vpc.c

[Qemu-block] [PATCH v5 3/9] vdi: Use QEMU UUID API

2016-08-11 Thread Fam Zheng
The UUID operations we need from libuuid is fully supported by QEMU UUID implementation. Use it, and remove the unused code. Signed-off-by: Fam Zheng --- block/vdi.c | 73 ++--- 1 file changed, 17 insertions(+), 56

[Qemu-block] [PATCH v5 9/9] tests: Add uuid tests

2016-08-11 Thread Fam Zheng
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 diff --git a/tests/Makefile.include b/tests/Makefile.include

[Qemu-block] [PATCH v5 6/9] tests: No longer dependent on CONFIG_UUID

2016-08-11 Thread Fam Zheng
crypto now uses built-in uuid implementation, so this check is not needed. Signed-off-by: Fam Zheng --- tests/test-crypto-block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-crypto-block.c b/tests/test-crypto-block.c index a38110d..1957a86

[Qemu-block] [PATCH v5 8/9] vl: Switch qemu_uuid to QemuUUID

2016-08-11 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, it's switching to QemuUUID is done here too to keep everything in sync and avoid code churn.

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

2016-08-11 Thread Fam Zheng
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 deletions(-) diff --git a/crypto/block-luks.c

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

2016-08-11 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 --- configure | 43 --- 1 file changed, 4 insertions(+), 39 deletions(-)