Re: [Qemu-block] [PATCH v4 0/3] block: Fix libbz2 library dependency regresssion

2016-09-14 Thread Fam Zheng
On Wed, 09/14 16:48, Max Reitz wrote: > On 2016-09-14 at 16:35, Stefan Hajnoczi wrote: > > On Mon, Sep 05, 2016 at 10:50:42AM +0800, Fam Zheng wrote: > > > v4: Remove unused variable in patch 1 and unwanted warning in patch 2. > > > [Max] > > > > > > v3: Fix typo in copyright header. [Max] > > >

Re: [Qemu-block] [PATCH 10/10] qemu-iotests/118: Test media change with qdev name

2016-09-14 Thread Eric Blake
On 08/19/2016 11:50 AM, Kevin Wolf wrote: > We just added the option to use qdev device names in all device related > block QMP commands. This patch converts some of the test cases in 118 to > use qdev device names instead of BlockBackend names to cover the new > way. It converts cases for each of

Re: [Qemu-block] [PATCH 09/10] block: Accept device model name for block_set_io_throttle

2016-09-14 Thread Eric Blake
On 08/19/2016 11:50 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow qdev device names in all device related > commands. > > This converts block_set_io_throttle to accept a qdev device name. > > Signed-off-by: Kevin Wolf

Re: [Qemu-block] [PATCH 08/10] block: Accept device model name for blockdev-change-medium

2016-09-14 Thread Eric Blake
On 08/19/2016 11:50 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow qdev device names in all device related > commands. > > This converts blockdev-change-medium to accept a qdev device name. > > Signed-off-by: Kevin Wolf

Re: [Qemu-block] [PATCH 00/10] block: Accept qdev IDs in device level QMP commands

2016-09-14 Thread John Snow
On 09/14/2016 09:03 AM, Kevin Wolf wrote: Am 05.09.2016 um 17:55 hat Kevin Wolf geschrieben: Am 19.08.2016 um 18:50 hat Kevin Wolf geschrieben: In order to remove the necessity to use BlockBackend names in the external API, we already converted all block layer QMP commands on the node level

Re: [Qemu-block] [PATCH 07/10] block: Accept device model name for eject

2016-09-14 Thread Eric Blake
On 08/19/2016 11:50 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow qdev device names in all device related > commands. > > This converts eject to accept a qdev device name. > > Signed-off-by: Kevin Wolf

Re: [Qemu-block] [PATCH 06/10] block: Accept device model name for x-blockdev-remove-medium

2016-09-14 Thread Eric Blake
On 08/19/2016 11:50 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow qdev device names in all device related > commands. > > This converts x-blockdev-remove-medium to accept a qdev device name. > > Signed-off-by: Kevin

Re: [Qemu-block] [PATCH 05/10] block: Accept device model name for x-blockdev-insert-medium

2016-09-14 Thread Eric Blake
On 08/19/2016 11:50 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow qdev device names in all device related > commands. > > This converts x-blockdev-insert-medium to accept a qdev device name. > Since this command is

Re: [Qemu-block] [PATCH 04/10] block: Accept device model name for blockdev-open/close-tray

2016-09-14 Thread Eric Blake
On 08/19/2016 11:50 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow qdev device names in all device related > commands. > > This converts blockdev-open/close-tray to accept a qdev device name. > > Signed-off-by: Kevin

Re: [Qemu-block] [PATCH 2/7] block: Set BDRV_O_ALLOW_RDWR and snapshot_options before storing the flags

2016-09-14 Thread Jeff Cody
On Wed, Sep 14, 2016 at 06:52:15PM +0300, Alberto Garcia wrote: > If an image is opened with snapshot=on, its flags are modified by > bdrv_backing_options() and then bs->open_flags is updated accordingly. > This last step is unnecessary if we calculate the new flags before > setting

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] block: mirror: fix wrong comment of mirror_start

2016-09-14 Thread Eric Blake
On 09/14/2016 06:03 AM, Yaowei Bai wrote: > Obviously, we should write to '@target'. > > Signed-off-by: Yaowei Bai > Reviewed-by: Xiubo Li > --- > include/block/block_int.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [Qemu-block] [PATCH 1/7] block: Remove bdrv_is_snapshot

2016-09-14 Thread Kevin Wolf
Am 14.09.2016 um 17:52 hat Alberto Garcia geschrieben: > This is unnecessary and has been unused since 5433c24f0f9306c82ad9bcc. > > Signed-off-by: Alberto Garcia Reviewed-by: Kevin Wolf

Re: [Qemu-block] [Qemu-devel] [PATCH 1/7] block: Remove bdrv_is_snapshot

2016-09-14 Thread Eric Blake
On 09/14/2016 10:52 AM, Alberto Garcia wrote: > This is unnecessary and has been unused since 5433c24f0f9306c82ad9bcc. > > Signed-off-by: Alberto Garcia > --- > block.c | 5 - > include/block/block.h | 1 - > 2 files changed, 6 deletions(-) Reviewed-by: Eric

Re: [Qemu-block] [PATCH 3/7] block: Update bs->open_flags earlier in bdrv_open_common()

2016-09-14 Thread Kevin Wolf
Am 14.09.2016 um 17:52 hat Alberto Garcia geschrieben: > We're only doing this immediately before opening the image, but > bs->open_flags is used earlier in the function. At the moment this is > not causing problems because none of the checked flags are modified by > update_flags_from_options(),

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

2016-09-14 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 15/18] blockdev: Add dynamic module loading for block drivers

2016-09-14 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 16/18] blockdev: Modularize nfs block driver

2016-09-14 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 17/18] commit: get the overlay node before manipulating the backing chain

2016-09-14 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 09/18] tests: Add test code for hbitmap serialization

2016-09-14 Thread Max Reitz
From: Fam Zheng Signed-off-by: Fam Zheng [Fixed minor constant issue. --js] Signed-off-by: John Snow Reviewed-by: Max Reitz Signed-off-by: John Snow Message-id:

[Qemu-block] [PULL 11/18] qemu-img: add the 'dd' subcommand

2016-09-14 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

[Qemu-block] [PULL 14/18] blockdev: Add dynamic generation of module_block.h

2016-09-14 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 13/18] blockdev: prepare iSCSI block driver for dynamic loading

2016-09-14 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 03/18] tests: Add test code for meta bitmap

2016-09-14 Thread Max Reitz
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: John Snow Reviewed-by: Max Reitz Signed-off-by: John Snow Message-id: 1470096763-14033-4-git-send-email-js...@redhat.com Signed-off-by: Max Reitz

[Qemu-block] [PULL 01/18] block: Hide HBitmap in block dirty bitmap interface

2016-09-14 Thread Max Reitz
From: 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

[Qemu-block] [PULL 10/18] block: More operations for meta dirty bitmap

2016-09-14 Thread Max Reitz
From: Fam Zheng Callers can create an iterator of meta bitmap with bdrv_dirty_meta_iter_new(), then use the bdrv_dirty_iter_* operations on it. Meta iterators are also counted by bitmap->active_iterators. Also add a couple of functions to retrieve granularity and count.

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

2016-09-14 Thread Stefan Hajnoczi
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 avoid a lot of checks when epoll is not enabled. > > Signed-off-by: Yaowei

Re: [Qemu-block] [PATCH 2/7] block: Set BDRV_O_ALLOW_RDWR and snapshot_options before storing the flags

2016-09-14 Thread Kevin Wolf
Am 14.09.2016 um 17:52 hat Alberto Garcia geschrieben: > If an image is opened with snapshot=on, its flags are modified by > bdrv_backing_options() and then bs->open_flags is updated accordingly. > This last step is unnecessary if we calculate the new flags before > setting bs->open_flags. > >

[Qemu-block] [PULL 06/18] block: Assert that bdrv_release_dirty_bitmap succeeded

2016-09-14 Thread Max Reitz
From: Fam Zheng We use a loop over bs->dirty_bitmaps to make sure the caller is only releasing a bitmap owned by bs. Let's also assert that in this case the caller is releasing a bitmap that does exist. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz

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

2016-09-14 Thread Max Reitz
The following changes since commit 507e4ddc3abf67391bcbc9624fd60b969c159b78: Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-fetch' into staging (2016-09-13 17:55:35 +0100) are available in the git repository at: git://github.com/XanClic/qemu.git tags/pull-block-2016-09-14

[Qemu-block] [PULL 05/18] block: Add two dirty bitmap getters

2016-09-14 Thread Max Reitz
From: Fam Zheng For dirty bitmap users to get the size and the name of a BdrvDirtyBitmap. Signed-off-by: Fam Zheng Reviewed-by: John Snow Reviewed-by: Max Reitz Signed-off-by: John Snow Message-id:

[Qemu-block] [PULL 02/18] HBitmap: Introduce "meta" bitmap to track bit changes

2016-09-14 Thread Max Reitz
From: Fam Zheng Upon each bit toggle, the corresponding bit in the meta bitmap will be set. Signed-off-by: Fam Zheng [Amended text inline. --js] Reviewed-by: Max Reitz Signed-off-by: John Snow Message-id:

[Qemu-block] [PULL 04/18] block: Support meta dirty bitmap

2016-09-14 Thread Max Reitz
From: Fam Zheng The added group of operations enables tracking of the changed bits in the dirty bitmap. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Signed-off-by: John Snow Message-id:

[Qemu-block] [PATCH 7/7] block: rename "read-only" to BDRV_OPT_READ_ONLY

2016-09-14 Thread Alberto Garcia
There were a few instances left. After this patch we're using the macro in all places. Signed-off-by: Alberto Garcia --- blockdev.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/blockdev.c b/blockdev.c index 3036af4..6db2c53 100644 ---

[Qemu-block] [PATCH 0/7] Add "read-only" to the options QDict

2016-09-14 Thread Alberto Garcia
This series adds "read-only" to the options QDict, fixing a long-standing problem with the reopening code. [E] <- [D] <- [C] <- [B] <- [A] In a normal scenario, the active layer [A] is in read-write mode and everything else is read-only. If we reopen [D] in read-write mode and later reopen

[Qemu-block] [PATCH 2/7] block: Set BDRV_O_ALLOW_RDWR and snapshot_options before storing the flags

2016-09-14 Thread Alberto Garcia
If an image is opened with snapshot=on, its flags are modified by bdrv_backing_options() and then bs->open_flags is updated accordingly. This last step is unnecessary if we calculate the new flags before setting bs->open_flags. Soon we'll introduce the "read-only" option, and then we'll need to

[Qemu-block] [PATCH 6/7] commit: Add 'base' to the reopen queue before 'overlay_bs'

2016-09-14 Thread Alberto Garcia
Now that we're checking for duplicates in the reopen queue, there's no need to force a specific order in which the queue is constructed so we can revert 3db2bd5508c86a1605258bc77c9672d93b5c350e. Since both ways of constructing the queue are now valid, this patch doesn't have any effect on the

[Qemu-block] [PATCH 5/7] block: Don't queue the same BDS twice in bdrv_reopen_queue_child()

2016-09-14 Thread Alberto Garcia
bdrv_reopen_queue_child() assumes that a BlockDriverState is never added twice to BlockReopenQueue. That's however not the case: commit_start() adds 'base' (and its children) to a new reopen queue, and then 'overlay_bs' (and its children, which include 'base') to the same queue. The effect of

[Qemu-block] [PATCH 3/7] block: Update bs->open_flags earlier in bdrv_open_common()

2016-09-14 Thread Alberto Garcia
We're only doing this immediately before opening the image, but bs->open_flags is used earlier in the function. At the moment this is not causing problems because none of the checked flags are modified by update_flags_from_options(), but this will change when we introduce the "read-only" option.

[Qemu-block] [PATCH 1/7] block: Remove bdrv_is_snapshot

2016-09-14 Thread Alberto Garcia
This is unnecessary and has been unused since 5433c24f0f9306c82ad9bcc. Signed-off-by: Alberto Garcia --- block.c | 5 - include/block/block.h | 1 - 2 files changed, 6 deletions(-) diff --git a/block.c b/block.c index 66ed1c0..1c75a6f 100644 --- a/block.c

Re: [Qemu-block] [PATCH v4 0/3] block: Fix libbz2 library dependency regresssion

2016-09-14 Thread Max Reitz
On 2016-09-14 at 16:35, Stefan Hajnoczi wrote: On Mon, Sep 05, 2016 at 10:50:42AM +0800, Fam Zheng wrote: v4: Remove unused variable in patch 1 and unwanted warning in patch 2. [Max] v3: Fix typo in copyright header. [Max] Fix pre-existing type casting. [Max] v2: Rebase on top of Max's

Re: [Qemu-block] [PATCH v4 0/3] block: Fix libbz2 library dependency regresssion

2016-09-14 Thread Stefan Hajnoczi
On Mon, Sep 05, 2016 at 10:50:42AM +0800, Fam Zheng wrote: > v4: Remove unused variable in patch 1 and unwanted warning in patch 2. [Max] > > v3: Fix typo in copyright header. [Max] > Fix pre-existing type casting. [Max] > > v2: Rebase on top of Max's block-next tree, which has Colin's

Re: [Qemu-block] [PATCH v4 0/3] block: Fix libbz2 library dependency regresssion

2016-09-14 Thread Stefan Hajnoczi
On Mon, Sep 05, 2016 at 10:50:42AM +0800, Fam Zheng wrote: > v4: Remove unused variable in patch 1 and unwanted warning in patch 2. [Max] > > v3: Fix typo in copyright header. [Max] > Fix pre-existing type casting. [Max] > > v2: Rebase on top of Max's block-next tree, which has Colin's

[Qemu-block] [PATCH 0/2] improve aio_poll performance

2016-09-14 Thread Yaowei Bai
This patchset change to check epoll's enablement first before nodes iteration to improve aio_poll()'s performance. Also fix a wrong comment of mirror_start(). Yaowei Bai (2): block: mirror: fix wrong comment of mirror_start aio: improve aio_poll performance by checking epoll only once

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

2016-09-14 Thread Yaowei Bai
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 avoid a lot of checks when epoll is not enabled. Signed-off-by: Yaowei Bai Reviewed-by: Xiubo Li

[Qemu-block] [PATCH 1/2] block: mirror: fix wrong comment of mirror_start

2016-09-14 Thread Yaowei Bai
Obviously, we should write to '@target'. Signed-off-by: Yaowei Bai Reviewed-by: Xiubo Li --- include/block/block_int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/block/block_int.h

Re: [Qemu-block] [PATCH 00/11] block: Remove BB interface from blockdev-add/del

2016-09-14 Thread Kevin Wolf
Am 23.08.2016 um 19:01 hat Kevin Wolf geschrieben: > This series makes the next step towards a QAPI interface that doesn't require > clients to know about BlockBackends. By removing the support for 'id' from > blockdev-add, it becomes a command that always only creates a BDS (with a node > name).

Re: [Qemu-block] [PATCH 00/10] block: Accept qdev IDs in device level QMP commands

2016-09-14 Thread Kevin Wolf
Am 05.09.2016 um 17:55 hat Kevin Wolf geschrieben: > Am 19.08.2016 um 18:50 hat Kevin Wolf geschrieben: > > In order to remove the necessity to use BlockBackend names in the external > > API, > > we already converted all block layer QMP commands on the node level to > > accept > > node names

[Qemu-block] [PULL 24/27] sheepdog: remove useless casts

2016-09-14 Thread Michael Tokarev
From: Laurent Vivier This patch is the result of coccinelle script scripts/coccinelle/typecast.cocci CC: Hitoshi Mitake CC: qemu-block@nongnu.org Signed-off-by: Laurent Vivier Reviewed-by: Hitoshi Mitake

Re: [Qemu-block] [PATCH v2] curl: Operate on zero-length file

2016-09-14 Thread Michael Tokarev
08.07.2016 14:18, Tomáš Golembiovský wrote: Another attempt to fix the bug 1596870. When creating new disk backed by remote file accessed via HTTPS and the backing file has zero length, qemu-img terminates with uniformative error message: qemu-img: disk.qcow2: CURL: Error opening file: