Re: [Qemu-block] [PATCH] block/vmdk: Report failures in vmdk_read_cid()

2018-01-23 Thread Fam Zheng
On Fri, Jan 19, 2018 at 7:35 PM, Paolo Bonzini wrote: > On 28/07/2017 14:54, Kevin Wolf wrote: >> Am 09.07.2017 um 19:06 hat Peter Maydell geschrieben: >>> The function vmdk_read_cid() can fail if the read on the underlying >>> block device fails, or if there's a format error

Re: [Qemu-block] [PATCH v3 5/5] iotest 201: new test for qmp nbd-server-remove

2018-01-23 Thread Eric Blake
On 01/19/2018 07:57 AM, Vladimir Sementsov-Ogievskiy wrote: > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/201 | 156 > + > tests/qemu-iotests/201.out | 5 ++ > tests/qemu-iotests/group | 1

Re: [Qemu-block] [PATCH v2 8/8] qapi: query-blockstat: add driver specific file-posix stats

2018-01-23 Thread Eric Blake
On 01/23/2018 05:28 AM, Anton Nefedov wrote: >>> + >>> +## >>> +# @BlockDriverStats: >>> +# >>> +# Statistics of a block driver (driver-specific) >>> +# >>> +# Since: 2.12 >>> +## >>> +{ 'union': 'BlockDriverStats', >>> +  'data': { >>> +  'file': 'BlockDriverStatsFile' >>> +  } } >> >>

[Qemu-block] [PULL 19/29] iotests: Fix 020 for vmdk

2018-01-23 Thread Kevin Wolf
From: Max Reitz vmdk cannot work with anything but vmdk backing files, so make the backing file be the same format as the overlay. Reported-by: John Snow Signed-off-by: Max Reitz Message-id: 20171123020832.8165-11-mre...@redhat.com

[Qemu-block] [PULL 20/29] iotests: Fix 051 for compat=0.10

2018-01-23 Thread Kevin Wolf
From: Max Reitz 051 has both compat=1.1 and compat=0.10 tests (once it uses lazy_refcounts, once it tests that setting them does not work). For the compat=0.10 tests, it already explicitly creates a suitable image. So let's just ignore the user-specified compat level for the

[Qemu-block] [PULL 23/29] iotests: Make 089 compatible with compat=0.10

2018-01-23 Thread Kevin Wolf
From: Max Reitz The only thing that is missing is a _filter_img_info after the "$QEMU_IO -c info" invocations. Signed-off-by: Max Reitz Message-id: 20171123020832.8165-15-mre...@redhat.com Reviewed-by: John Snow Signed-off-by: Max Reitz

[Qemu-block] [PULL 18/29] iotests: Skip 103 for refcount_bits=1

2018-01-23 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Message-id: 20171123020832.8165-9-mre...@redhat.com Reviewed-by: John Snow Signed-off-by: Max Reitz --- tests/qemu-iotests/103 | 2 ++ 1 file changed, 2 insertions(+) diff

[Qemu-block] [PULL 15/29] iotests: Fix _img_info for backslashes

2018-01-23 Thread Kevin Wolf
From: Max Reitz read without -r eats backslashes. Signed-off-by: Max Reitz Message-id: 20171123020832.8165-6-mre...@redhat.com Reviewed-by: Fam Zheng Signed-off-by: Max Reitz --- tests/qemu-iotests/common.rc | 2 +- 1

[Qemu-block] [PULL 29/29] iotests: Disable some tests for compat=0.10

2018-01-23 Thread Kevin Wolf
From: Max Reitz Tests 080, 130, 137, and 176 simply do not work with compat=0.10 for the reasons stated there. Signed-off-by: Max Reitz Message-Id: <20171123020832.8165-10-mre...@redhat.com> [eblake: fix 177 in a separate commit] Signed-off-by: Eric Blake

[Qemu-block] [PULL 24/29] iotests: Make 184 image-less

2018-01-23 Thread Kevin Wolf
From: Max Reitz 184 does not need an image, so don't use one. Signed-off-by: Max Reitz Message-id: 20171123020832.8165-16-mre...@redhat.com Reviewed-by: John Snow Signed-off-by: Max Reitz --- tests/qemu-iotests/184

[Qemu-block] [PULL 12/29] qcow2: No persistent dirty bitmaps for compat=0.10

2018-01-23 Thread Kevin Wolf
From: Max Reitz Persistent dirty bitmaps require a properly functioning autoclear_features field, or we cannot track when an unsupporting program might overwrite them. Therefore, we cannot support them for compat=0.10 images. Signed-off-by: Max Reitz

[Qemu-block] [PULL 25/29] iotests: Make 191 work with qcow2 options

2018-01-23 Thread Kevin Wolf
From: Max Reitz In order for 191 to work with an explicit refcount_bits or compat=0.10, we should strip format-specific information from the output--and we can do so by using _filter_img_info. Signed-off-by: Max Reitz Message-id:

[Qemu-block] [PULL 02/29] hw/block: Fix pin-based interrupt behaviour of NVMe

2018-01-23 Thread Kevin Wolf
From: Hikaru Nishida Pin-based interrupt of NVMe controller did not work properly because using an obsolated function pci_irq_pulse(). To fix this, change to use pci_irq_assert() / pci_irq_deassert() instead of pci_irq_pulse(). Signed-off-by: Hikaru Nishida

[Qemu-block] [PULL 27/29] iotests: Make 059 pass on machines with little RAM

2018-01-23 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Message-id: 20171129192411.6637-1-mre...@redhat.com Reviewed-by: John Snow Signed-off-by: Max Reitz --- tests/qemu-iotests/059 | 4 +++- 1 file changed, 3 insertions(+), 1

[Qemu-block] [PULL 26/29] iotests: Filter compat-dependent info in 198

2018-01-23 Thread Kevin Wolf
From: Max Reitz There is a bit of image-specific information which depends on the qcow2 compat level. Filter it so that 198 works with compat=0.10 (and any refcount_bits value). Note that we cannot simply drop the --format-specific switch because we do need the "encrypt"

[Qemu-block] [PULL 28/29] iotests: Split 177 into two parts for compat=0.10

2018-01-23 Thread Kevin Wolf
From: Eric Blake When originally written, test 177 explicitly took care to run with compat=0.10. Then I botched my own test in commit 81c219ac and f0a9c18f, by adding additional actions that require v3 images. Split out the new code into a new v3-only test, 204, and revert

[Qemu-block] [PULL 16/29] iotests: Drop format-specific in _filter_img_info

2018-01-23 Thread Kevin Wolf
From: Max Reitz _filter_img_info should remove format-specific information, too. We already have such a filter in _img_info, and it is very useful for query-block-named-block-nodes (etc.), too. However, in 198 we need that information (but we still want the rest of the

[Qemu-block] [PULL 21/29] iotests: Fix 059's reference output

2018-01-23 Thread Kevin Wolf
From: Max Reitz As of commit 9877860e7bd1e26ee70ab9bb5ebc34c92bf23bf5, vmdk fails differently when opening the sample image. Signed-off-by: Max Reitz Message-id: 20171123020832.8165-13-mre...@redhat.com Reviewed-by: John Snow

[Qemu-block] [PULL 05/29] qcow2: Repair unaligned preallocated zero clusters

2018-01-23 Thread Kevin Wolf
From: Max Reitz We can easily repair unaligned preallocated zero clusters by discarding them, so why not do it? Signed-off-by: Max Reitz Message-id: 20171110203759.14018-2-mre...@redhat.com Reviewed-by: Eric Blake Signed-off-by: Max

[Qemu-block] [PULL 01/29] osdep: Retry SETLK upon EINTR

2018-01-23 Thread Kevin Wolf
From: Fam Zheng We could hit lock failure if there is a signal that makes fcntl return -1 and errno set to EINTR. In this case we should retry. Cc: qemu-sta...@nongnu.org Signed-off-by: Fam Zheng Reviewed-by: Eric Blake Signed-off-by: Kevin

[Qemu-block] [PULL 17/29] iotests: Forbid 020 for non-file protocols

2018-01-23 Thread Kevin Wolf
From: Max Reitz This test does funny things like TEST_IMG="TEST_IMG.base" _make_test_img that usually only work with the file protocol. More specifically, they do not work with the most interesting non-file protocols, so we might as well skip this for anything but file.

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

2018-01-23 Thread Kevin Wolf
The following changes since commit ee86981bda9ecd40c8daf81b7307b1d2aff68174: migration: Revert postcopy-blocktime commit set (2018-01-23 10:08:05 +) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fetch changes up to

[Qemu-block] [PULL 04/29] tests/qemu-iotests: adding savevm/loadvm with postcopy flag test

2018-01-23 Thread Kevin Wolf
From: Daniel Henrique Barboza This patch implements a test case for the scenario that was failing prior to the patch "migration/ram.c: do not set 'postcopy_running' in POSTCOPY_INCOMING_END", commit acab30b85d. This new test file 201 was derived from the test file

[Qemu-block] [PULL 11/29] block/vmdk: Fix , instead of ; at end of line

2018-01-23 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Message-id: 20171123020832.8165-2-mre...@redhat.com Reviewed-by: Eric Blake Reviewed-by: Fam Zheng Signed-off-by: Max Reitz --- block/vmdk.c | 2 +- 1 file

[Qemu-block] [PULL 22/29] iotests: Fix 067 for compat=0.10

2018-01-23 Thread Kevin Wolf
From: Max Reitz 067 works very well with compat=0.10 once you remove format-specific information from the QMP output. Signed-off-by: Max Reitz Message-id: 20171123020832.8165-14-mre...@redhat.com Reviewed-by: John Snow Signed-off-by: Max

[Qemu-block] [PULL 09/29] blockdev: Mark BD-{remove, insert}-medium stable

2018-01-23 Thread Kevin Wolf
From: Max Reitz Now that iotest 093 test proves that the throttling configuration survives a blockdev-remove-medium/blockdev-insert-medium pair, the original reason for declaring these commands experimental is gone (see commit 6e0abc251dd4f8eba1f53656dfede12e5840e83b).

[Qemu-block] [PULL 10/29] qemu-iotests: Fix locking issue in 102

2018-01-23 Thread Kevin Wolf
From: Max Reitz 102 truncates a qcow2 file (the raw file) on purpose while a VM is running. However, image locking will usually prevent exactly this. The fact that most people have not noticed until now (I suppose you may have seen sporadic failures, but not taken them too

[Qemu-block] [PULL 07/29] tests/ahci: Switch tray and medium commands to @id

2018-01-23 Thread Kevin Wolf
From: Max Reitz Currently, the tray and medium commands in the AHCI test use the deprecated @device parameter. This patch switches all invocations over to use @id. Signed-off-by: Max Reitz Message-id: 20171110224302.14424-3-mre...@redhat.com Reviewed-by:

[Qemu-block] [PULL 14/29] block/vmdk: Add blkdebug events

2018-01-23 Thread Kevin Wolf
From: Max Reitz This is certainly not complete, but it includes at least write_aio and read_aio. Signed-off-by: Max Reitz Message-id: 20171123020832.8165-5-mre...@redhat.com Reviewed-by: Fam Zheng Signed-off-by: Max Reitz

[Qemu-block] [PULL 13/29] block/qcow: Add blkdebug events

2018-01-23 Thread Kevin Wolf
From: Max Reitz This is not necessarily complete, but it should include the most important places. Signed-off-by: Max Reitz Message-id: 20171123020832.8165-4-mre...@redhat.com Reviewed-by: Eric Blake Signed-off-by: Max Reitz

[Qemu-block] [PULL 06/29] iotests: Make BD-{remove, insert}-medium use @id

2018-01-23 Thread Kevin Wolf
From: Max Reitz In some cases, these commands still use the deprecated @device parameter. Fix that so we can later drop that parameter from their interface. Signed-off-by: Max Reitz Message-id: 20171110224302.14424-2-mre...@redhat.com Reviewed-by: Alberto

[Qemu-block] [PULL 08/29] blockdev: Drop BD-{remove, insert}-medium's @device

2018-01-23 Thread Kevin Wolf
From: Max Reitz This is an incompatible change, which is fine as the commands are experimental. Signed-off-by: Max Reitz Message-id: 20171110224302.14424-4-mre...@redhat.com Reviewed-by: Alberto Garcia Signed-off-by: Max Reitz

[Qemu-block] [PULL 03/29] tests/.gitignore: Add test-bdrv-drain

2018-01-23 Thread Kevin Wolf
Commit 881cfd17 added a new test binary, include it in .gitignore. Reported-by: Eric Blake Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- tests/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/.gitignore

Re: [Qemu-block] [PATCH v2 8/8] qapi: query-blockstat: add driver specific file-posix stats

2018-01-23 Thread Anton Nefedov
On 22/1/2018 11:55 PM, Eric Blake wrote: On 01/19/2018 06:50 AM, Anton Nefedov wrote: A block driver can provide a callback to report driver-specific statistics. file-posix driver now reports discard statistics Signed-off-by: Anton Nefedov Reviewed-by: Vladimir

Re: [Qemu-block] [PATCH v2 3/8] ide: account UNMAP (TRIM) operations

2018-01-23 Thread Anton Nefedov
On 22/1/2018 11:48 PM, Eric Blake wrote: On 01/19/2018 06:50 AM, Anton Nefedov wrote: Signed-off-by: Anton Nefedov --- hw/ide/core.c | 13 + 1 file changed, 13 insertions(+) @@ -460,10 +468,15 @@ static void ide_issue_trim_cb(void *opaque, int

Re: [Qemu-block] [PATCH v2 2/8] qapi: add unmap to BlockDeviceStats

2018-01-23 Thread Anton Nefedov
On 22/1/2018 11:47 PM, Eric Blake wrote: On 01/19/2018 06:50 AM, Anton Nefedov wrote: Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia --- qapi/block-core.json