Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] qemu-iotests/109: Fix lock race condition

2017-08-01 Thread John Snow
On 08/01/2017 05:31 PM, Cleber Rosa wrote: > A race condition is currently present between the clean up attempt of > the QEMU process and the execution of qemu-img. The actual (bad) > output is: > > -Warning: Image size mismatch! > -Images are identical. > +qemu-img: Could not open '/tests/q

Re: [Qemu-block] [PATCH 1/1] qemu-iotests/109: Fix lock race condition

2017-08-01 Thread Jeff Cody
On Tue, Aug 01, 2017 at 05:31:27PM -0400, Cleber Rosa wrote: > A race condition is currently present between the clean up attempt of > the QEMU process and the execution of qemu-img. The actual (bad) > output is: > > -Warning: Image size mismatch! > -Images are identical. > +qemu-img: Could no

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.10 1/1] qemu-iotests/109: Fix lock race condition

2017-08-01 Thread Eric Blake
On 08/01/2017 04:31 PM, Cleber Rosa wrote: > A race condition is currently present between the clean up attempt of > the QEMU process and the execution of qemu-img. The actual (bad) > output is: > > -Warning: Image size mismatch! > -Images are identical. > +qemu-img: Could not open '/tests/qem

Re: [Qemu-block] [Qemu-devel] [PATCH v2 for-2.11 3/3] qemu-iotests: add option to save temp files on error

2017-08-01 Thread Jeff Cody
On Tue, Aug 01, 2017 at 08:34:01AM +0200, Markus Armbruster wrote: > Jeff Cody writes: > > > Now that ./check takes care of cleaning up after each tests, it > > can also selectively not clean up. Add option to leave all output from > > tests intact if that test encountered an error. > > > > Note

[Qemu-block] [PATCH 1/1] qemu-iotests/109: Fix lock race condition

2017-08-01 Thread Cleber Rosa
A race condition is currently present between the clean up attempt of the QEMU process and the execution of qemu-img. The actual (bad) output is: -Warning: Image size mismatch! -Images are identical. +qemu-img: Could not open '/tests/qemu-iotests/scratch/t.raw': Failed to get "consistent read

[Qemu-block] [PATCH 0/1] qemu-iotests/109: Fix lock race condition

2017-08-01 Thread Cleber Rosa
A race condition is currently present between the clean up attempt of the QEMU process and the execution of qemu-img. Cleber Rosa(1): qemu-iotests/109: Fix lock/race condition tests/qemu-iotests/109 | 3 ++- tests/qemu-iotests/109.out | 56 ++

Re: [Qemu-block] [PULL v2 00/14] Block layer patches for 2.10.0-rc1

2017-08-01 Thread Peter Maydell
On 1 August 2017 at 17:12, Kevin Wolf wrote: > The following changes since commit 5619c179057e24195ff19c8fe6d6a6cbcb16ed28: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20170731' into staging (2017-07-31 > 14:45:42 +0100) > > are available in the git repository at:

Re: [Qemu-block] [PATCH v3 4/7] block: convert ThrottleGroup to object with QOM

2017-08-01 Thread Manos Pitsidianakis
On Tue, Aug 01, 2017 at 04:47:03PM +0100, Stefan Hajnoczi wrote: On Mon, Jul 31, 2017 at 12:54:40PM +0300, Manos Pitsidianakis wrote: ThrottleGroup is converted to an object. This will allow the future throttle block filter drive easy creation and configuration of throttle groups in QMP and cli.

Re: [Qemu-block] [PATCH v3 5/7] block: add throttle block filter driver

2017-08-01 Thread Stefan Hajnoczi
On Mon, Jul 31, 2017 at 12:54:41PM +0300, Manos Pitsidianakis wrote: > +static int throttle_configure_tgm(BlockDriverState *bs, > + ThrottleGroupMember *tgm, > + QDict *options, Error **errp) > +{ > +int ret; > +ThrottleConfi

Re: [Qemu-block] [PATCH v3 4/7] block: convert ThrottleGroup to object with QOM

2017-08-01 Thread Stefan Hajnoczi
On Mon, Jul 31, 2017 at 12:54:40PM +0300, Manos Pitsidianakis wrote: > ThrottleGroup is converted to an object. This will allow the future > throttle block filter drive easy creation and configuration of throttle > groups in QMP and cli. > > A new QAPI struct, ThrottleLimits, is introduced to prov

Re: [Qemu-block] [PATCH v3 6/7] block: add BlockDevOptionsThrottle to QAPI

2017-08-01 Thread Stefan Hajnoczi
On Mon, Jul 31, 2017 at 12:54:42PM +0300, Manos Pitsidianakis wrote: > @@ -3095,6 +3096,22 @@ > '*tls-creds': 'str' } } > > ## > +# @BlockdevOptionsThrottle: > +# > +# Driver specific block device options for the throttle driver > +# > +# @throttle-group: the name of the throttle-

[Qemu-block] [PULL v2 00/14] Block layer patches for 2.10.0-rc1

2017-08-01 Thread Kevin Wolf
The following changes since commit 5619c179057e24195ff19c8fe6d6a6cbcb16ed28: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20170731' into staging (2017-07-31 14:45:42 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for

Re: [Qemu-block] [PULL 00/15] Block layer patches for 2.10.0-rc1

2017-08-01 Thread Kevin Wolf
Am 01.08.2017 um 18:01 hat Peter Maydell geschrieben: > On 1 August 2017 at 15:46, Kevin Wolf wrote: > > The following changes since commit 5619c179057e24195ff19c8fe6d6a6cbcb16ed28: > > > > Merge remote-tracking branch > > 'remotes/pmaydell/tags/pull-target-arm-20170731' into staging (2017-07-3

Re: [Qemu-block] [PULL 00/15] Block layer patches for 2.10.0-rc1

2017-08-01 Thread Peter Maydell
On 1 August 2017 at 15:46, Kevin Wolf wrote: > The following changes since commit 5619c179057e24195ff19c8fe6d6a6cbcb16ed28: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20170731' into staging (2017-07-31 > 14:45:42 +0100) > > are available in the git repository at:

Re: [Qemu-block] [PATCH 07/18] nbd: Minimal structured read for client

2017-08-01 Thread Vladimir Sementsov-Ogievskiy
01.08.2017 18:41, Vladimir Sementsov-Ogievskiy wrote: 07.02.2017 23:14, Eric Blake wrote: On 02/03/2017 09:47 AM, Vladimir Sementsov-Ogievskiy wrote: Minimal implementation: always send DF flag, to not deal with fragmented replies. This works well with your minimal server implementation, but

Re: [Qemu-block] [PATCH 07/18] nbd: Minimal structured read for client

2017-08-01 Thread Vladimir Sementsov-Ogievskiy
07.02.2017 23:14, Eric Blake wrote: On 02/03/2017 09:47 AM, Vladimir Sementsov-Ogievskiy wrote: Minimal implementation: always send DF flag, to not deal with fragmented replies. This works well with your minimal server implementation, but I worry that it will cause us to fall over when talking

[Qemu-block] [PULL 14/15] qemu-iotests/059: Fix leaked image files

2017-08-01 Thread Kevin Wolf
qemu-iotests 059 left a whole lot of image files behind in the scratch directory because VMDK creates additional files for extents and cleaning them up requires the original image intact (it parses qemu-img info output to find all extent files), but the image overwrote it many times like it works f

[Qemu-block] [PULL 11/15] qemu-iotests/153: Fix leaked scratch images

2017-08-01 Thread Kevin Wolf
qemu-iotests 153 left t.qcow2.c behind in the scratch directory. Make sure to clean it up after completing the tests. Signed-off-by: Kevin Wolf Reviewed-by: Jeff Cody Reviewed-by: Eric Blake --- tests/qemu-iotests/153 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/153 b

[Qemu-block] [PULL 13/15] qemu-iotests/063: Fix leaked image

2017-08-01 Thread Kevin Wolf
qemu-iotests 063 left t.raw.raw1 behind in the scratch directory because it used the wrong suffix. Make sure to clean it up after completing the test. Signed-off-by: Kevin Wolf Reviewed-by: Jeff Cody Reviewed-by: Eric Blake --- tests/qemu-iotests/063 | 4 +--- 1 file changed, 1 insertion(+), 3

[Qemu-block] [PULL 10/15] qemu-iotests/141: Fix image cleanup

2017-08-01 Thread Kevin Wolf
qemu-iotests 141 attempted to use brace expansion to remove all images with a single command. However, for this to work, the braces shouldn't be quoted. With this fix, the tests correctly cleans up its scratch images. Signed-off-by: Kevin Wolf Reviewed-by: Jeff Cody Reviewed-by: Eric Blake ---

[Qemu-block] [PULL 12/15] qemu-iotests/162: Fix leaked temporary files

2017-08-01 Thread Kevin Wolf
qemu-iotests 162 left qemu-nbd.pid behind in the scratch directory, and potentially a file called '42' in the current directory. Make sure to clean it up after completing the tests. Signed-off-by: Kevin Wolf Reviewed-by: Jeff Cody Reviewed-by: Eric Blake --- tests/qemu-iotests/162 | 7 +++

[Qemu-block] [PULL 08/15] qemu-iotests/041: Fix leaked scratch images

2017-08-01 Thread Kevin Wolf
qemu-iotests 041 left quorum_snapshot.img and target.img behind in the scratch directory. Make sure to clean up after completing the tests. Signed-off-by: Kevin Wolf Reviewed-by: Jeff Cody Reviewed-by: Eric Blake --- tests/qemu-iotests/041 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(

[Qemu-block] [PULL 09/15] qemu-iotests: Remove blkdebug.conf after tests

2017-08-01 Thread Kevin Wolf
qemu-iotests 074 and 179 left a blkdebug.conf behind in the scratch directory. Make sure to clean up after completing the tests. Signed-off-by: Kevin Wolf Reviewed-by: Jeff Cody Reviewed-by: Eric Blake --- tests/qemu-iotests/074 | 1 + tests/qemu-iotests/179 | 1 + 2 files changed, 2 insertion

[Qemu-block] [PULL 15/15] block/qapi: Remove redundant NULL check to silence Coverity

2017-08-01 Thread Kevin Wolf
When skipping implicit nodes in bdrv_block_device_info(), we know that bs0 is always non-NULL; initially, because it's taken from a BdrvChild and a BdrvChild never has a NULL bs, and after the first iteration because implicit nodes always have a backing file. Remove the NULL check and add an asser

[Qemu-block] [PULL 01/15] docs: add qemu-block-drivers(7) man page

2017-08-01 Thread Kevin Wolf
From: Stefan Hajnoczi Block driver documentation is available in qemu-doc.html. It would be convenient to have documentation for formats, protocols, and filter drivers in a man page. Extract the relevant part of qemu-doc.html into a new file called docs/qemu-block-drivers.texi. This file can a

[Qemu-block] [PULL 02/15] iotests: Fix test 156

2017-08-01 Thread Kevin Wolf
From: Max Reitz On one hand, the _make_test_img invocation for creating the target image was missing a -u because its backing file is not supposed to exist at that point. On the other hand, nobody noticed probably because the backing file is created later on and _cleanup failed to remove it: The

[Qemu-block] [PULL 07/15] block: fix leaks in bdrv_open_driver()

2017-08-01 Thread Kevin Wolf
From: Manos Pitsidianakis bdrv_open_driver() is called in two places, bdrv_new_open_driver() and bdrv_open_common(). In the latter, failure cleanup in is in its caller, bdrv_open_inherit(), which unrefs the bs->file of the failed driver open if it exists. Let's move the bs->file cleanup to bdrv_

[Qemu-block] [PULL 06/15] block: fix dangling bs->explicit_options in block.c

2017-08-01 Thread Kevin Wolf
From: Manos Pitsidianakis In some error paths it is possible to QDECREF a freed dangling explicit_options, resulting in a heap overflow crash. For example bdrv_open_inherit()'s fail unrefs it, then calls bdrv_unref which calls bdrv_close which also unrefs it. Signed-off-by: Manos Pitsidianakis

[Qemu-block] [PULL 03/15] iotests: Redirect stderr to stdout in 186

2017-08-01 Thread Kevin Wolf
From: Max Reitz Without redirecting qemu's stderr to stdout, _filter_qemu will not apply to warnings. This results in $QEMU_PROG not being replaced by QEMU_PROG which is not great if your qemu executable is not called qemu-system-x86_64 (e.g. qemu-system-i386). Signed-off-by: Max Reitz Reviewe

[Qemu-block] [PULL 04/15] iotests: Check dirty bitmap statistics in 124

2017-08-01 Thread Kevin Wolf
From: Eric Blake We had a bug for multiple releases where dirty-bitmap count was documented in bytes but reported in sectors; enhance the testsuite to add coverage of DirtyBitmapInfo to ensure we do not regress again. Signed-off-by: Eric Blake Reviewed-by: Stefan Hajnoczi Reviewed-by: John Sno

[Qemu-block] [PULL 05/15] iotests: Add test of recent fix to 'qemu-img measure'

2017-08-01 Thread Kevin Wolf
From: Eric Blake The new test 190 ensures we don't regress back to an infinite loop when measuring the size of a 2T+ qcow2 image. I did not append to test 178, because that test is also designed to run with format 'raw'; also, this gives us some coverage of the measure command under the quick gr

[Qemu-block] [PULL 00/15] Block layer patches for 2.10.0-rc1

2017-08-01 Thread Kevin Wolf
The following changes since commit 5619c179057e24195ff19c8fe6d6a6cbcb16ed28: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20170731' into staging (2017-07-31 14:45:42 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for

[Qemu-block] [PATCH v4 14/15] iotest 190: test BDRV_REQ_ALLOCATE

2017-08-01 Thread Anton Nefedov
Signed-off-by: Anton Nefedov --- tests/qemu-iotests/190 | 146 + tests/qemu-iotests/190.out | 50 tests/qemu-iotests/group | 1 + 3 files changed, 197 insertions(+) create mode 100755 tests/qemu-iotests/190 create mode 100644

[Qemu-block] [PATCH v4 12/15] qcow2: skip writing zero buffers to empty COW areas

2017-08-01 Thread Anton Nefedov
It can be detected that 1. COW alignment of a write request is zeroes 2. Respective areas on the underlying BDS already read as zeroes after being preallocated previously If both of these true, COW may be skipped Signed-off-by: Anton Nefedov --- block/qcow2.h | 12 +++

[Qemu-block] [PATCH v4 09/15] qcow2: truncate preallocated space

2017-08-01 Thread Anton Nefedov
From: "Denis V. Lunev" This could be done after calculation of the end of data and metadata in the qcow2 image. Signed-off-by: Denis V. Lunev Signed-off-by: Anton Nefedov --- block/qcow2.h | 3 +++ block/qcow2-cluster.c | 9 + block/qcow2-refcount.c | 7 +++ block/qcow2.

Re: [Qemu-block] [Qemu-devel] [PATCH 4/6] hw/block: Fix the return type

2017-08-01 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Wed, Jul 26, 2017 at 08:02:53PM +0800, Mao Zhongyi wrote: >> When the function no success value to transmit, it usually make the >> function return void. It has turned out not to be a success, because >> it means that the extra local_err variable and error_propagate()

[Qemu-block] [PATCH v4 07/15] qcow2: preallocation at image expand

2017-08-01 Thread Anton Nefedov
From: "Denis V. Lunev" This patch adds image preallocation at expand to provide better locality of QCOW2 image file and optimize this procedure for some distributed storage where this procedure is slow. Preallocation is not issued upon writing metadata clusters. Possible conflicts are resolved

[Qemu-block] [PATCH v4 15/15] iotest 134: test cluster-misaligned encrypted write

2017-08-01 Thread Anton Nefedov
COW (even empty/zero) areas require encryption too Signed-off-by: Anton Nefedov --- tests/qemu-iotests/134 | 9 + tests/qemu-iotests/134.out | 10 ++ 2 files changed, 19 insertions(+) diff --git a/tests/qemu-iotests/134 b/tests/qemu-iotests/134 index 9914415..6083ae4 100755

[Qemu-block] [PATCH v4 10/15] qcow2: check space leak at the end of the image

2017-08-01 Thread Anton Nefedov
From: Pavel Butsykin Preallocated space in the image may remain unused; the patch adds the functionality to identify and fix it in the qcow2_check to avoid wasting storage space on the host. Signed-off-by: Pavel Butsykin Signed-off-by: Denis V. Lunev Signed-off-by: Anton Nefedov --- block/qc

[Qemu-block] [PATCH v4 00/15] qcow2: space preallocation and COW improvements

2017-08-01 Thread Anton Nefedov
Changes in v4: - rebased on top of Eric's series [PATCH v2 00/20] add byte-based block_status driver callbacks http://lists.nongnu.org/archive/html/qemu-devel/2017-07/msg04370.html - patch 5 fixed to compile without CONFIG_FALLOCATE and support BDRV_REQ_ALLOCATE with xfsctl enable

[Qemu-block] [PATCH v4 11/15] qcow2: move is_zero() up

2017-08-01 Thread Anton Nefedov
To be used in the following commit without a forward declaration. Signed-off-by: Anton Nefedov --- block/qcow2.c | 45 ++--- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index f522ba9..2ec8b03 100644 --- a/b

[Qemu-block] [PATCH v4 13/15] qcow2: allocate image space by-cluster

2017-08-01 Thread Anton Nefedov
If COW areas of the newly allocated clusters are zeroes on the backing image: (even if preallocation feature is not used or it cannot detect if the image already reads as zeroes, e.g. writing to a hole / preallocated zero cluster) efficient bdrv_write_zeroes(flags=BDRV_REQ_ALLOCATE) can be used on

[Qemu-block] [PATCH v4 03/15] block: introduce BDRV_REQ_ALLOCATE flag

2017-08-01 Thread Anton Nefedov
The flag is supposed to indicate that the region of the disk image has to be sufficiently allocated so it reads as zeroes. The call with the flag set has to return -ENOTSUP if allocation cannot be done efficiently (i.e. without falling back to writing actual buffers) Signed-off-by: Anton Nefedov

[Qemu-block] [PATCH v4 02/15] blkverify: set supported write/zero flags

2017-08-01 Thread Anton Nefedov
Signed-off-by: Anton Nefedov --- block/blkverify.c | 9 + 1 file changed, 9 insertions(+) diff --git a/block/blkverify.c b/block/blkverify.c index 06369f9..9ba65d0 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -140,6 +140,15 @@ static int blkverify_open(BlockDriverState *bs,

[Qemu-block] [PATCH v4 04/15] block: treat BDRV_REQ_ALLOCATE as serialising

2017-08-01 Thread Anton Nefedov
The idea is that ALLOCATE requests may overlap with other requests. Reuse the existing block layer infrastructure for serialising requests. Use the following approach: - mark ALLOCATE serialising, so subsequent requests to the area wait - ALLOCATE request itself must never wait if another reque

[Qemu-block] [PATCH v4 08/15] qcow2: set inactive flag

2017-08-01 Thread Anton Nefedov
Qcow2State and BlockDriverState flags have to be in sync Signed-off-by: Anton Nefedov --- block/qcow2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow2.c b/block/qcow2.c index 66aa8c2..2a1d2f2 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -2138,6 +2138,7 @@ static int qcow2_i

[Qemu-block] [PATCH v4 06/15] block: support BDRV_REQ_ALLOCATE in passthrough drivers

2017-08-01 Thread Anton Nefedov
Support the flag if the underlying BDS supports it Signed-off-by: Anton Nefedov --- block/blkdebug.c | 3 ++- block/blkverify.c | 2 +- block/mirror.c | 2 +- block/raw-format.c | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/block/blkdebug.c b/block/blkdebug.c ind

[Qemu-block] [PATCH v4 05/15] file-posix: support BDRV_REQ_ALLOCATE

2017-08-01 Thread Anton Nefedov
Current write_zeroes implementation is good enough to satisfy this flag too Signed-off-by: Anton Nefedov --- block/file-posix.c | 8 1 file changed, 8 insertions(+) diff --git a/block/file-posix.c b/block/file-posix.c index 765a440..4ef1b1d 100644 --- a/block/file-posix.c +++ b/block/f

[Qemu-block] [PATCH v4 01/15] mirror: inherit supported write/zero flags

2017-08-01 Thread Anton Nefedov
Signed-off-by: Anton Nefedov --- block/mirror.c | 5 + 1 file changed, 5 insertions(+) diff --git a/block/mirror.c b/block/mirror.c index d46dace..7e539f1 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1056,6 +1056,11 @@ static void bdrv_mirror_top_refresh_filename(BlockDriverState *b

Re: [Qemu-block] [RFC] block-insert-node and block-job-delete

2017-08-01 Thread Manos Pitsidianakis
On Tue, Aug 01, 2017 at 03:50:36PM +0200, Kevin Wolf wrote: Am 31.07.2017 um 19:30 hat Manos Pitsidianakis geschrieben: On Fri, Jul 28, 2017 at 02:08:43PM +0200, Kevin Wolf wrote: > Am 27.07.2017 um 12:07 hat Stefan Hajnoczi geschrieben: > > On Wed, Jul 26, 2017 at 09:23:20PM +0300, Manos Pitsid

[Qemu-block] [PATCH 1/3] block: add options parameter to bdrv_new_open_driver()

2017-08-01 Thread Manos Pitsidianakis
Allow passing a QDict *options parameter to bdrv_new_open_driver() so that it can be used if a driver needs it upon creation. The previous behaviour (empty bs->options and bs->explicit_options) remains when options is NULL. Signed-off-by: Manos Pitsidianakis --- block.c | 16 ++

Re: [Qemu-block] [RFC] block-insert-node and block-job-delete

2017-08-01 Thread Kevin Wolf
Am 31.07.2017 um 19:30 hat Manos Pitsidianakis geschrieben: > On Fri, Jul 28, 2017 at 02:08:43PM +0200, Kevin Wolf wrote: > > Am 27.07.2017 um 12:07 hat Stefan Hajnoczi geschrieben: > > > On Wed, Jul 26, 2017 at 09:23:20PM +0300, Manos Pitsidianakis wrote: > > > > On Wed, Jul 26, 2017 at 04:12:21PM

[Qemu-block] [PATCH 2/3] block: skip implicit nodes in snapshots, blockjobs

2017-08-01 Thread Manos Pitsidianakis
Implicit filter nodes added at the top of nodes can interfere with block jobs. This is not a problem when they are added by other jobs since adding another job will issue a QERR_DEVICE_IN_USE, but it can happen in the next commit which introduces an implicitly created throttle filter node below Blo

[Qemu-block] [PATCH 0/3] block: remove legacy I/O throttling

2017-08-01 Thread Manos Pitsidianakis
This series depends on my other series 'add throttle block driver filter' currently on v3, which as the name suggests adds a throttle filter driver. Replacing the current I/O interface means the user will use the same options as before and QEMU will create a hidden throttle filter node beneath the

[Qemu-block] [PATCH 3/3] block: remove legacy I/O throttling

2017-08-01 Thread Manos Pitsidianakis
This commit removes all I/O throttling from block/block-backend.c. In order to support the existing interface, it is changed to use the block/throttle.c filter driver. The throttle filter node that is created by the legacy interface is stored in a 'throttle_node' field in the BlockBackendPublic of

Re: [Qemu-block] [PATCH] block: check BlockDriverState object before dereference

2017-08-01 Thread Kevin Wolf
Am 01.08.2017 um 10:35 hat Paolo Bonzini geschrieben: > On 01/08/2017 02:14, John Snow wrote: > > I may need some nudging towards understanding what the right solution > > here is, though. Should the blk_aio_flush assume that there always is a > > root BDS? should it not assume that? > > I think b

Re: [Qemu-block] [Qemu-devel] [PATCH 4/6] hw/block: Fix the return type

2017-08-01 Thread Stefan Hajnoczi
On Wed, Jul 26, 2017 at 08:02:53PM +0800, Mao Zhongyi wrote: > When the function no success value to transmit, it usually make the > function return void. It has turned out not to be a success, because > it means that the extra local_err variable and error_propagate() will > be needed. It leads to

Re: [Qemu-block] [Qemu-devel] [PATCH v2] iscsi: use scsi_create_task()

2017-08-01 Thread Paolo Bonzini
On 28/07/2017 19:52, Marc-André Lureau wrote: > > Stupid question: what's the benefit? > > scsi_create/scsi_free is a library API. If they have their own > allocator, we better use it, or it may easily break, no? Well, that would be an API breakage, but I see the point. I think I would pr

Re: [Qemu-block] [PATCH v3 09/13] qcow2: move is_zero_sectors() up

2017-08-01 Thread Anton Nefedov
On 07/31/2017 10:13 PM, Eric Blake wrote: On 07/31/2017 11:22 AM, Anton Nefedov wrote: To be used in the following commit without a forward declaration. Signed-off-by: Anton Nefedov --- block/qcow2.c | 39 +++ 1 file changed, 19 insertions(+), 20 deletion

Re: [Qemu-block] [PATCH v3 04/13] block: support BDRV_REQ_ALLOCATE in passthrough drivers

2017-08-01 Thread Anton Nefedov
On 07/31/2017 10:11 PM, Eric Blake wrote: On 07/31/2017 11:21 AM, Anton Nefedov wrote: Support the flag if the underlying BDS supports it Signed-off-by: Anton Nefedov --- block/blkdebug.c | 3 ++- block/raw-format.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) What about

Re: [Qemu-block] [PATCH v3] qemu-iotests: add a "how to" to ./README

2017-08-01 Thread Stefan Hajnoczi
On Mon, Jul 31, 2017 at 12:28:44PM -0500, Eric Blake wrote: > On 07/31/2017 11:26 AM, Stefan Hajnoczi wrote: > > There is not much getting started documentation for qemu-iotests. This > > patch explains how to create a new test and covers the overall testing > > approach. > > > > Cc: Ishani Chugh

Re: [Qemu-block] [PATCH] block: check BlockDriverState object before dereference

2017-08-01 Thread Paolo Bonzini
On 01/08/2017 02:14, John Snow wrote: > I may need some nudging towards understanding what the right solution > here is, though. Should the blk_aio_flush assume that there always is a > root BDS? should it not assume that? I think blk_aio_flush is not special. If there is no root BDS, either you