Re: [PATCH 0/5] block/dirty-bitmap: check number and size constraints against queued bitmaps

2019-10-10 Thread Vladimir Sementsov-Ogievskiy
09.10.2019 23:44, John Snow wrote: > > > On 10/9/19 2:57 PM, Eric Blake wrote: >> On 6/6/19 1:41 PM, John Snow wrote: >>> When adding new persistent dirty bitmaps, we only check constraints >>> against currently stored bitmaps, and ignore the pending number and size >>> of any bitmaps yet to be

RE: [PATCH v6 4/4] colo: Update Documentation for continuous replication

2019-10-10 Thread Zhang, Chen
> -Original Message- > From: Lukas Straub > Sent: Wednesday, October 9, 2019 11:17 PM > To: Zhang, Chen > Cc: qemu-devel ; Jason Wang > ; Wen Congyang ; > Xie Changlong ; Kevin Wolf > ; Max Reitz ; qemu-block > > Subject: Re: [PATCH v6 4/4] colo: Update Documentation for continuous >

[PATCH 0/2] qcow2: Limit total allocation range to INT_MAX

2019-10-10 Thread Max Reitz
Hi, While looking for why handle_alloc_space() seems to cause issues on ppc64le+XFS (performance degradation and data corruption), I spotted this other issue. It isn’t as bad, but still needs fixing. See patch 1 for what is fixed and patch 2 for what breaks otherwise. Max Reitz (2): qcow2:

[PATCH 2/2] iotests: Test large write request to qcow2 file

2019-10-10 Thread Max Reitz
Without HEAD^, the following happens when you attempt a large write request to a qcow2 file such that the number of bytes covered by all clusters involved in a single allocation will exceed INT_MAX: (A) handle_alloc_space() decides to fill the whole area with zeroes and fails because

[PATCH 1/2] qcow2: Limit total allocation range to INT_MAX

2019-10-10 Thread Max Reitz
When the COW areas are included, the size of an allocation can exceed INT_MAX. This is kind of limited by handle_alloc() in that it already caps avail_bytes at INT_MAX, but the number of clusters still reflects the original length. This can have all sorts of effects, ranging from the storage

Re: [PATCH v2 1/1] IDE: deprecate ide-drive

2019-10-10 Thread Thomas Huth
On 10/10/2019 00.43, John Snow wrote: > It's an old compatibility shim that just delegates to ide-cd or ide-hd. > I'd like to refactor these some day, and getting rid of the super-object > will make that easier. > > Either way, we don't need this. > > Libvirt-checked-by: Peter Krempa >

Re: [PATCH v2 1/1] IDE: deprecate ide-drive

2019-10-10 Thread Markus Armbruster
John Snow writes: > It's an old compatibility shim that just delegates to ide-cd or ide-hd. > I'd like to refactor these some day, and getting rid of the super-object > will make that easier. > > Either way, we don't need this. > > Libvirt-checked-by: Peter Krempa > Signed-off-by: John Snow

[PULL 07/36] block/backup: fix backup_cow_with_offload for last cluster

2019-10-10 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy We shouldn't try to copy bytes beyond EOF. Fix it. Fixes: 9ded4a0114968e Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow Message-id: 20190920142056.12778-3-vsement...@virtuozzo.com Signed-off-by: Max Reitz ---

[PULL 16/36] iotests: 257: drop device_add

2019-10-10 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy SCSI devices are unused in test, drop them. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-id: 20190920142056.12778-12-vsement...@virtuozzo.com Signed-off-by: Max Reitz --- tests/qemu-iotests/257 | 8 ---

[PULL 06/36] block/backup: fix max_transfer handling for copy_range

2019-10-10 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Of course, QEMU_ALIGN_UP is a typo, it should be QEMU_ALIGN_DOWN, as we are trying to find aligned size which satisfy both source and target. Also, don't ignore too small max_transfer. In this case seems safer to disable copy_range. Fixes: 9ded4a0114968e

Re: [PATCH v2 1/1] IDE: deprecate ide-drive

2019-10-10 Thread Philippe Mathieu-Daudé
On 10/10/19 1:26 PM, Peter Krempa wrote: On Thu, Oct 10, 2019 at 13:22:37 +0200, Philippe Mathieu-Daudé wrote: On 10/10/19 12:43 AM, John Snow wrote: It's an old compatibility shim that just delegates to ide-cd or ide-hd. I'd like to refactor these some day, and getting rid of the super-object

[PULL 28/36] iotests: Use stat -c %b in 125

2019-10-10 Thread Max Reitz
125 should not use qemu-img to get the on-disk image size, because that reports it in a human-readable format that is useless to us. Just use stat instead (like we do to get the image file length). Signed-off-by: Max Reitz Message-id: 20190925183231.11196-4-mre...@redhat.com Reviewed-by: Eric

[PULL 36/36] iotests/162: Fix for newer Linux 5.3+

2019-10-10 Thread Max Reitz
Linux 5.3 has made 0.0.0.0/8 a working IPv4 subnet. As such, "42" is now a valid host, and the connection to it will (hopefully) time out over a long period rather than quickly return with EINVAL. So let us use a negative integer for testing that NBD will not crash when it receives integer

[PULL 29/36] block/backup: move in-flight requests handling from backup to block-copy

2019-10-10 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Move synchronization mechanism to block-copy, to be able to use one block-copy instance from backup job and backup-top filter in parallel. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-id: 20191001131409.14202-2-vsement...@virtuozzo.com Reviewed-by: Max

[PULL 11/36] block/backup: fix block-comment style

2019-10-10 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy We need to fix comment style around block-copy functions before further moving them to separate file to satisfy checkpatch. But do more: fix all comments style. Also, seems like doubled first asterisk is not forbidden, but drop it too for consistency.

[PULL 22/36] scsi: move unmap error checking to the complete callback

2019-10-10 Thread Max Reitz
From: Anton Nefedov This will help to account the operation in the following commit. The difference is that we don't call scsi_disk_req_check_error() before the 1st discard iteration anymore. That function also checks if the request is cancelled, however it shouldn't get canceled until it

[PULL 21/36] scsi: store unmap offset and nb_sectors in request struct

2019-10-10 Thread Max Reitz
From: Anton Nefedov it allows to report it in the error handler Signed-off-by: Anton Nefedov Message-id: 20190923121737.83281-6-anton.nefe...@virtuozzo.com Signed-off-by: Max Reitz --- hw/scsi/scsi-disk.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

[PULL 32/36] block: introduce backup-top filter driver

2019-10-10 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Backup-top filter caches write operations and does copy-before-write operations. The driver will be used in backup instead of write-notifiers. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-id: 20191001131409.14202-5-vsement...@virtuozzo.com

Re: [RFC PATCH] virtio-blk: advertise F_WCE (F_FLUSH) if F_CONFIG_WCE is also advertised

2019-10-10 Thread Evgeny Yakovlev
On 09.10.2019 22:14, Michael S. Tsirkin wrote: On Tue, Oct 08, 2019 at 02:24:16PM +0100, Stefan Hajnoczi wrote: On Fri, Sep 20, 2019 at 02:56:30PM +0300, Evgeny Yakovlev wrote: Virtio spec 1.1 (and earlier), 5.2.5.1 Driver Requirements: Device Initialization: "Devices SHOULD always offer

[PULL 31/36] block/block-copy: split block_copy_set_callbacks function

2019-10-10 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Split block_copy_set_callbacks out of block_copy_state_new. It's needed for further commit: block-copy will use BdrvChildren of backup-top filter, so it will be created from backup-top filter creation function. But callbacks will still belong to backup job and

[PATCH v3 5/8] hw/ide/via82c: Convert reset handler to DeviceReset

2019-10-10 Thread Philippe Mathieu-Daudé
The VIA82C686B IDE controller is a PCI device, it will be reset when the PCI bus it stands on is reset. Convert its reset handler into a proper Device reset method. Reviewed-by: Li Qiang Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/via.c | 10 -- 1 file changed, 4 insertions(+), 6

[PULL 30/36] block/backup: move write_flags calculation inside backup_job_create

2019-10-10 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy This is logic-less refactoring, which simplifies further patch, as we'll need write_flags for backup-top filter creation and backup-top should be created before block job creation. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-id:

Re: [PATCH v2 1/1] IDE: deprecate ide-drive

2019-10-10 Thread Peter Krempa
On Thu, Oct 10, 2019 at 13:42:26 +0200, Philippe Mathieu-Daudé wrote: > On 10/10/19 1:26 PM, Peter Krempa wrote: > > On Thu, Oct 10, 2019 at 13:22:37 +0200, Philippe Mathieu-Daudé wrote: > > > On 10/10/19 12:43 AM, John Snow wrote: > > > > It's an old compatibility shim that just delegates to

[PULL 34/36] nbd: add empty .bdrv_reopen_prepare

2019-10-10 Thread Max Reitz
From: Maxim Levitsky Fixes commit job / qemu-img commit, when commiting qcow2 file which is based on nbd export. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1718727 Signed-off-by: Maxim Levitsky Message-id: 20190930213820.29777-2-mlevi...@redhat.com Signed-off-by: Max Reitz ---

[PATCH v3 7/8] hw/input/lm832x: Convert reset handler to DeviceReset

2019-10-10 Thread Philippe Mathieu-Daudé
The LM8323 key-scan controller is a I2C device, it will be reset when the I2C bus it stands on is reset. Convert its reset handler into a proper Device reset method. Reviewed-by: Li Qiang Signed-off-by: Philippe Mathieu-Daudé --- hw/input/lm832x.c | 12 +--- 1 file changed, 5

Re: [PATCH v2 1/1] IDE: deprecate ide-drive

2019-10-10 Thread Peter Krempa
On Thu, Oct 10, 2019 at 13:22:37 +0200, Philippe Mathieu-Daudé wrote: > On 10/10/19 12:43 AM, John Snow wrote: > > It's an old compatibility shim that just delegates to ide-cd or ide-hd. > > I'd like to refactor these some day, and getting rid of the super-object > > will make that easier. > > >

[PULL 00/36] Block patches

2019-10-10 Thread Max Reitz
The following changes since commit 98b2e3c9ab3abfe476a2b02f8f51813edb90e72d: Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2019-10-08 16:08:35 +0100) are available in the Git repository at: https://github.com/XanClic/qemu.git

[PULL 03/36] block/qcow2: refactor qcow2_co_preadv_part

2019-10-10 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Further patch will run partial requests of iterations of qcow2_co_preadv in parallel for performance reasons. To prepare for this, separate part which may be parallelized into separate function (qcow2_co_preadv_task). While being here, also separate encrypted

[PULL 02/36] block: introduce aio task pool

2019-10-10 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Common interface for aio task loops. To be used for improving performance of synchronous io loops in qcow2, block-stream, copy-on-read, and may be other places. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-id:

[PULL 14/36] iotests: prepare 124 and 257 bitmap querying for backup-top filter

2019-10-10 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy After backup-top filter appearing it's not possible to see dirty bitmaps in top node, so use node-name instead. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-id: 20190920142056.12778-10-vsement...@virtuozzo.com Signed-off-by: Max

[PULL 01/36] qemu-iotests: ignore leaks on failure paths in 026

2019-10-10 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Upcoming asynchronous handling of sub-parts of qcow2 requests will change number of leaked clusters and even make it racy. As a preparation, ignore leaks on failure parts in 026. It's not trivial to just grep or substitute qemu-img output for such thing.

[PULL 15/36] iotests: 257: drop unused Drive.device field

2019-10-10 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy After previous commit Drive.device is actually unused. Drop it together with .name property. While being here reuse .node in qmp commands instead of writing 'drive0' twice. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-id:

[PULL 35/36] tests: fix I/O test for hosts defaulting to LUKSv2

2019-10-10 Thread Max Reitz
From: Daniel P. Berrangé Some distros are now defaulting to LUKS version 2 which QEMU cannot process. For our I/O test that validates interoperability between the kernel/cryptsetup and QEMU, we need to explicitly ask for version 1 of the LUKS format. Signed-off-by: Daniel P. Berrangé

[PULL 25/36] qapi: query-blockstat: add driver specific file-posix stats

2019-10-10 Thread Max Reitz
From: Anton Nefedov 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 Sementsov-Ogievskiy Acked-by: Markus Armbruster Message-id:

[PULL 27/36] iotests: Disable 125 on broken XFS versions

2019-10-10 Thread Max Reitz
And by that I mean all XFS versions, as far as I can tell. All details are in the comment below. We never noticed this problem because we only read the first number from qemu-img info's "disk size" output -- and that is effectively useless, because qemu-img prints a human-readable value (which

Re: [PATCH v2 0/8] hw: Convert various reset() handler to DeviceReset

2019-10-10 Thread Philippe Mathieu-Daudé
On 10/10/19 3:05 AM, Li Qiang wrote: Philippe Mathieu-Daudé mailto:phi...@redhat.com>> 于 2019年10月10日周四 上午3:54写道: Hi Li, On 10/9/19 4:28 AM, Li Qiang wrote: > Philippe Mathieu-Daudé mailto:phi...@redhat.com> >> 于 >

[PATCH v3 6/8] hw/isa/vt82c686: Convert reset handler to DeviceReset

2019-10-10 Thread Philippe Mathieu-Daudé
The VIA VT82C686 Southbridge is a PCI device, it will be reset when the PCI bus it stands on is reset. Convert its reset handler into a proper Device reset method. Reviewed-by: Li Qiang Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/vt82c686.c | 11 --- 1 file changed, 4

Re: [PATCH v2 1/1] IDE: deprecate ide-drive

2019-10-10 Thread Philippe Mathieu-Daudé
On 10/10/19 12:43 AM, John Snow wrote: It's an old compatibility shim that just delegates to ide-cd or ide-hd. I'd like to refactor these some day, and getting rid of the super-object will make that easier. Either way, we don't need this. Libvirt-checked-by: Peter Krempa Peter made a

[PULL 17/36] qapi: group BlockDeviceStats fields

2019-10-10 Thread Max Reitz
From: Anton Nefedov Make the stat fields definition slightly more readable. Also reorder total_time_ns stats read-write-flush as done elsewhere. Cosmetic change only. Signed-off-by: Anton Nefedov Reviewed-by: Alberto Garcia Reviewed-by: Vladimir Sementsov-Ogievskiy Message-id:

[PULL 13/36] block: teach bdrv_debug_breakpoint skip filters with backing

2019-10-10 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Teach bdrv_debug_breakpoint and bdrv_debug_remove_breakpoint skip filters with backing. This is needed to implement and use in backup job it's own backup_top filter driver (like mirror already has one), and without this improvement, breakpoint removal will fail

[PULL 23/36] scsi: account unmap operations

2019-10-10 Thread Max Reitz
From: Anton Nefedov Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Message-id: 20190923121737.83281-8-anton.nefe...@virtuozzo.com Signed-off-by: Max Reitz --- hw/scsi/scsi-disk.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git

[PULL 26/36] iotests: Fix 125 for growth_mode = metadata

2019-10-10 Thread Max Reitz
If we use growth_mode = metadata, it is very much possible that the file uses more disk space after we have written something to the added area. We did indeed want to test for this case, but unfortunately we evidently just copied the code from the "Test creation preallocation" section and forgot

[PATCH v3 0/8] hw: Convert various reset() handler to DeviceReset

2019-10-10 Thread Philippe Mathieu-Daudé
Only patch 3/8 is missing review: - hw/ide/piix: Convert reset handler to DeviceReset Since v2: - Fixed PIIX_IDE conversion (Li) - Added more R-b tag. Since v1: - Removed the pci-host devices - Removed the vmcoreinfo conversion (elmarco) but add a comment. - Added Igor's R-b tag. Following the

[PULL 09/36] block/backup: improve comment about image fleecing

2019-10-10 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-id: 20190920142056.12778-5-vsement...@virtuozzo.com Signed-off-by: Max Reitz --- block/backup.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git

[PULL 08/36] block/backup: split shareable copying part from backup_do_cow

2019-10-10 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Split copying logic which will be shared with backup-top filter. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-id: 20190920142056.12778-4-vsement...@virtuozzo.com Signed-off-by: Max Reitz --- block/backup.c | 47

[PULL 19/36] block: add empty account cookie type

2019-10-10 Thread Max Reitz
From: Anton Nefedov Each block_acct_done/failed call is designed to correspond to a previous block_acct_start call, which initializes the stats cookie. However sometimes it is not the case, e.g. some error paths might report the same cookie twice because it is hard to accurately track if the

[PULL 12/36] block: move block_copy from block/backup.c to separate file

2019-10-10 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Split block_copy to separate file, to be cleanly shared with backup-top filter driver in further commits. It's a clean movement, the only change is drop "static" from interface functions. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz

[PULL 20/36] ide: account UNMAP (TRIM) operations

2019-10-10 Thread Max Reitz
From: Anton Nefedov Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Message-id: 20190923121737.83281-5-anton.nefe...@virtuozzo.com Signed-off-by: Max Reitz --- hw/ide/core.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/ide/core.c b/hw/ide/core.c

Re: [PATCH v2 02/11] qcrypto-luks: extend the create options for upcoming encryption key management

2019-10-10 Thread Kevin Wolf
Am 13.09.2019 um 00:30 hat Maxim Levitsky geschrieben: > Now you can specify which slot to put the encryption key to > Plus add 'active' option which will let user erase the key secret > instead of adding it. > Check that active=true it when creating. > > Signed-off-by: Maxim Levitsky > diff

Re: [PATCH v2 3/4] qemu-iotests: 044: pass is actually a noop, so remove it

2019-10-10 Thread Philippe Mathieu-Daudé
On 10/9/19 9:47 PM, Cleber Rosa wrote: Reviewed-by: Eric Blake Signed-off-by: Cleber Rosa --- tests/qemu-iotests/044 | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/qemu-iotests/044 b/tests/qemu-iotests/044 index 8b2afa2a11..aa2a00ceed 100755 --- a/tests/qemu-iotests/044 +++

[PULL 24/36] file-posix: account discard operations

2019-10-10 Thread Max Reitz
From: Anton Nefedov This will help to identify how many of the user-issued discard operations (accounted on a device level) have actually suceeded down on the host file (even though the numbers will not be exactly the same if non-raw format driver is used (e.g. qcow2 sending metadata discards)).

[PULL 05/36] block/qcow2: introduce parallel subrequest handling in read and write

2019-10-10 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy It improves performance for fragmented qcow2 images. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-id: 20190916175324.18478-6-vsement...@virtuozzo.com Signed-off-by: Max Reitz --- block/qcow2.h | 3 ++ block/qcow2.c | 125

[PULL 33/36] block/backup: use backup-top instead of write notifiers

2019-10-10 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Drop write notifiers and use filter node instead. = Changes = 1. Add filter-node-name argument for backup qmp api. We have to do it in this commit, as 257 needs to be fixed. 2. There are no more write notifiers here, so is_write_notifier parameter is dropped

[PULL 18/36] qapi: add unmap to BlockDeviceStats

2019-10-10 Thread Max Reitz
From: Anton Nefedov Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Eric Blake Message-id: 20190923121737.83281-3-anton.nefe...@virtuozzo.com Signed-off-by: Max Reitz --- qapi/block-core.json | 29

[PATCH v3 1/8] hw/acpi/piix4: Convert reset handler to DeviceReset

2019-10-10 Thread Philippe Mathieu-Daudé
The PIIX4/PM is a PCI device within the PIIX4 chipset, it will be reset when the PCI bus it stands on is reset. Convert its reset handler into a proper Device reset method. Reviewed-by: Igor Mammedov Reviewed-by: Li Qiang Reviewed-by: Michael S. Tsirkin Signed-off-by: Philippe Mathieu-Daudé

[PULL 04/36] block/qcow2: refactor qcow2_co_pwritev_part

2019-10-10 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Similarly to previous commit, prepare for parallelizing write-loop iterations. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-id: 20190916175324.18478-5-vsement...@virtuozzo.com Signed-off-by: Max Reitz --- block/qcow2.c | 154

[PULL 10/36] block/backup: introduce BlockCopyState

2019-10-10 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Split copying code part from backup to "block-copy", including separate state structure and function renaming. This is needed to share it with backup-top filter driver in further commits. Notes: 1. As BlockCopyState keeps own BlockBackend objects, remaining

Re: [PATCH v2 1/1] IDE: deprecate ide-drive

2019-10-10 Thread Kevin Wolf
Am 10.10.2019 um 13:54 hat Peter Krempa geschrieben: > On Thu, Oct 10, 2019 at 13:42:26 +0200, Philippe Mathieu-Daudé wrote: > > On 10/10/19 1:26 PM, Peter Krempa wrote: > > > On Thu, Oct 10, 2019 at 13:22:37 +0200, Philippe Mathieu-Daudé wrote: > > > > On 10/10/19 12:43 AM, John Snow wrote: > > >

[PATCH v3 3/8] hw/ide/piix: Convert reset handler to DeviceReset

2019-10-10 Thread Philippe Mathieu-Daudé
The PIIX/IDE is a PCI device within a PIIX chipset, it will be reset when the PCI bus it stands on is reset. Convert its reset handler into a proper Device reset method. Signed-off-by: Philippe Mathieu-Daudé --- v3: Also convert PIIX4 (Li Qiang) --- hw/ide/piix.c | 9 - 1 file changed,

[PATCH v3 4/8] hw/ide/sii3112: Convert reset handler to DeviceReset

2019-10-10 Thread Philippe Mathieu-Daudé
The SiI3112A SATA controller is a PCI device, it will be reset when the PCI bus it stands on is reset. Convert its reset handler into a proper Device reset method. Reviewed-by: Li Qiang Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/sii3112.c | 7 +++ 1 file changed, 3 insertions(+), 4

[PATCH v3 2/8] hw/isa/piix4: Convert reset handler to DeviceReset

2019-10-10 Thread Philippe Mathieu-Daudé
The PIIX4/ISA is a PCI device within the PIIX4 chipset, it will be reset when the PCI bus it stands on is reset. Convert its reset handler into a proper Device reset method. Reviewed-by: Li Qiang Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/piix4.c | 7 +++ 1 file changed, 3

[PATCH v3 8/8] hw/misc/vmcoreinfo: Add comment about reset handler

2019-10-10 Thread Philippe Mathieu-Daudé
The VM coreinfo device does not sit on a bus, so it won't be reset automatically. This is why it calls qemu_register_reset(). Add a comment about it, so we don't convert its reset handler to a DeviceReset method. Reviewed-by: Marc-André Lureau Reviewed-by: Li Qiang Signed-off-by: Philippe

[PATCH 22/23] iotests/267: Create socket in $SOCK_DIR

2019-10-10 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/267 | 4 ++-- tests/qemu-iotests/267.out | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/267 b/tests/qemu-iotests/267 index d37a67c012..170e173c0a 100755 --- a/tests/qemu-iotests/267 +++

[PATCH 14/23] iotests/194: Create sockets in $SOCK_DIR

2019-10-10 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/194 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/194 b/tests/qemu-iotests/194 index d746ab1e21..72e47e8833 100755 --- a/tests/qemu-iotests/194 +++ b/tests/qemu-iotests/194 @@ -26,8 +26,8 @@

[PATCH 16/23] iotests/205: Create socket in $SOCK_DIR

2019-10-10 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/205 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/205 b/tests/qemu-iotests/205 index 76f6c5fa2b..4bb2c21e8b 100755 --- a/tests/qemu-iotests/205 +++ b/tests/qemu-iotests/205 @@ -24,7 +24,7 @@ import iotests

[PATCH 13/23] iotests/192: Create socket in $SOCK_DIR

2019-10-10 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/192 | 4 ++-- tests/qemu-iotests/192.out | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/192 b/tests/qemu-iotests/192 index 034432272f..d2ba55dd90 100755 --- a/tests/qemu-iotests/192 +++

[PATCH 15/23] iotests/201: Create socket in $SOCK_DIR

2019-10-10 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/201 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/201 b/tests/qemu-iotests/201 index 7abf740fe4..86fa37e714 100755 --- a/tests/qemu-iotests/201 +++ b/tests/qemu-iotests/201 @@ -24,7 +24,7 @@ echo "QA output

[PATCH 06/23] iotests/083: Create socket in $SOCK_DIR

2019-10-10 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/083 | 6 +++--- tests/qemu-iotests/083.out | 34 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/tests/qemu-iotests/083 b/tests/qemu-iotests/083 index b270550d3e..10fdfc8ebb 100755 ---

[PATCH 07/23] iotests/140: Create socket in $SOCK_DIR

2019-10-10 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/140 | 8 tests/qemu-iotests/140.out | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/140 b/tests/qemu-iotests/140 index b965b1dd5d..8d2ce5d9e3 100755 --- a/tests/qemu-iotests/140 +++

[RESEND PATCH V4] block/vhdx: add check for truncated image files

2019-10-10 Thread Peter Lieven
qemu is currently not able to detect truncated vhdx image files. Add a basic check if all allocated blocks are reachable at open and report all errors during bdrv_co_check. Signed-off-by: Peter Lieven --- V4: - allow partial last blocks [Kevin] - report offsets in error messages [Kevin]

Re: [Qemu-block] [PATCH v2 1/2] blockdev: release the AioContext at drive_backup_prepare

2019-10-10 Thread Kevin Wolf
Am 03.10.2019 um 11:33 hat Sergio Lopez geschrieben: > > Sergio Lopez writes: > > > Kevin Wolf writes: > > > >> Am 13.09.2019 um 21:54 hat John Snow geschrieben: > >>> > >>> > >>> On 9/13/19 11:25 AM, Sergio Lopez wrote: > >>> > do_drive_backup() already acquires the AioContext, so release

Re: [PATCH 1/2] qcow2: Limit total allocation range to INT_MAX

2019-10-10 Thread Eric Blake
On 10/10/19 5:08 AM, Max Reitz wrote: When the COW areas are included, the size of an allocation can exceed INT_MAX. This is kind of limited by handle_alloc() in that it already caps avail_bytes at INT_MAX, but the number of clusters still reflects the original length. This can have all sorts

Re: Problems with c8bb23cbdbe3 on ppc64le

2019-10-10 Thread Anton Nefedov
On 10/10/2019 6:17 PM, Max Reitz wrote: > Hi everyone, > > (CCs just based on tags in the commit in question) > > I have two bug reports which claim problems of qcow2 on XFS on ppc64le > machines since qemu 4.1.0. One of those is about bad performance > (sorry, is isn’t public :-/), the other

Re: [PATCH V4] block/vhdx: add check for truncated image files

2019-10-10 Thread Kevin Wolf
Am 10.09.2019 um 17:26 hat Peter Lieven geschrieben: > qemu is currently not able to detect truncated vhdx image files. > Add a basic check if all allocated blocks are reachable at open and > report all errors during bdrv_co_check. > > Signed-off-by: Peter Lieven Thanks, applied to the block

Re: [PATCH 2/2] iotests: Test large write request to qcow2 file

2019-10-10 Thread Eric Blake
On 10/10/19 5:08 AM, Max Reitz wrote: Without HEAD^, the following happens when you attempt a large write request to a qcow2 file such that the number of bytes covered by all clusters involved in a single allocation will exceed INT_MAX: (A) handle_alloc_space() decides to fill the whole area

Problems with c8bb23cbdbe3 on ppc64le

2019-10-10 Thread Max Reitz
Hi everyone, (CCs just based on tags in the commit in question) I have two bug reports which claim problems of qcow2 on XFS on ppc64le machines since qemu 4.1.0. One of those is about bad performance (sorry, is isn’t public :-/), the other about data corruption

[PATCH 02/23] iotests.py: Store socket files in $SOCK_DIR

2019-10-10 Thread Max Reitz
iotests.py itself does not store socket files, but it machine.py and qtest.py do. iotests.py needs to pass the respective path to them, and they need to adhere to it. Signed-off-by: Max Reitz --- python/qemu/machine.py| 15 --- python/qemu/qtest.py | 9 ++---

[PATCH 01/23] iotests: Introduce $SOCK_DIR

2019-10-10 Thread Max Reitz
Unix sockets generally have a maximum path length. Depending on your $TEST_DIR, it may be exceeded and then all tests that create and use Unix sockets there may fail. Circumvent this by adding a new scratch directory specifically for Unix socket files. It defaults to a temporary directory

[PATCH 00/23] iotests: Add and use $SOCK_DIR

2019-10-10 Thread Max Reitz
Hi, Perhaps the main reason we cannot run important tests such as 041 in CI is that when they care Unix sockets in $TEST_DIR, the path may become too long to connect to them. To get by this problem, this series lets the check script create a new temporary directory (mktemp -d) and then makes the

[PATCH 04/23] iotests: Filter $SOCK_DIR

2019-10-10 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/common.filter | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter index 9f418b4881..cd42f5e7e3 100644 --- a/tests/qemu-iotests/common.filter +++

[PATCH 18/23] iotests/209: Create socket in $SOCK_DIR

2019-10-10 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/209 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/209 b/tests/qemu-iotests/209 index 259e991ec6..e0f464bcbe 100755 --- a/tests/qemu-iotests/209 +++ b/tests/qemu-iotests/209 @@ -24,7 +24,8 @@ from iotests

[PATCH 17/23] iotests/208: Create socket in $SOCK_DIR

2019-10-10 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/208 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/208 b/tests/qemu-iotests/208 index 1e202388dc..546eb1de3e 100755 --- a/tests/qemu-iotests/208 +++ b/tests/qemu-iotests/208 @@ -26,7 +26,7 @@

[PATCH 23/23] iotests: Drop TEST_DIR filter from _filter_nbd

2019-10-10 Thread Max Reitz
Sockets should be placed into $SOCK_DIR instead of $TEST_DIR, so remove the $TEST_DIR filter from _filter_nbd. Signed-off-by: Max Reitz --- tests/qemu-iotests/common.filter | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter

[PATCH 09/23] iotests/147: Create socket in $SOCK_DIR

2019-10-10 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/147 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/147 b/tests/qemu-iotests/147 index ab8480b9a4..03fc2fabcf 100755 --- a/tests/qemu-iotests/147 +++ b/tests/qemu-iotests/147 @@ -32,7 +32,7 @@

[PATCH 12/23] iotests/183: Create socket in $SOCK_DIR

2019-10-10 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/183 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/183 b/tests/qemu-iotests/183 index 04fb344d08..bced83fae0 100755 --- a/tests/qemu-iotests/183 +++ b/tests/qemu-iotests/183 @@ -26,7 +26,7 @@ echo "QA output

[PATCH 19/23] iotests/222: Create socket in $SOCK_DIR

2019-10-10 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/222 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/222 b/tests/qemu-iotests/222 index 0ead56d574..3f9f934ad8 100644 --- a/tests/qemu-iotests/222 +++ b/tests/qemu-iotests/222 @@ -48,7 +48,7 @@ remainder =

[PATCH 20/23] iotests/223: Create socket in $SOCK_DIR

2019-10-10 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/223 | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/qemu-iotests/223 b/tests/qemu-iotests/223 index 2ba3d8124b..b5a80e50bb 100755 --- a/tests/qemu-iotests/223 +++ b/tests/qemu-iotests/223 @@ -28,7 +28,7 @@

[PATCH 05/23] iotests: Let common.nbd create socket in $SOCK_DIR

2019-10-10 Thread Max Reitz
In addition, drop the nbd_unix_socket assignment in 241 because it does not really do anything. Signed-off-by: Max Reitz --- tests/qemu-iotests/241| 2 -- tests/qemu-iotests/common.nbd | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/qemu-iotests/241

[PATCH 03/23] iotests.py: Add @base_dir to FilePaths etc.

2019-10-10 Thread Max Reitz
Specifying this optional parameter allows creating temporary files in other directories than the test_dir; for example in sock_dir. Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH 11/23] iotests/182: Create socket in $SOCK_DIR

2019-10-10 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/182 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/182 b/tests/qemu-iotests/182 index 7f494eb9bb..1ccb850055 100755 --- a/tests/qemu-iotests/182 +++ b/tests/qemu-iotests/182 @@ -31,7 +31,7 @@ _cleanup()

[PATCH 08/23] iotests/143: Create socket in $SOCK_DIR

2019-10-10 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/143 | 6 +++--- tests/qemu-iotests/143.out | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/143 b/tests/qemu-iotests/143 index 92249ac8da..f649b36195 100755 --- a/tests/qemu-iotests/143 +++

[PATCH 10/23] iotests/181: Create socket in $SOCK_DIR

2019-10-10 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/181 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/181 b/tests/qemu-iotests/181 index e317e63422..378c2899d1 100755 --- a/tests/qemu-iotests/181 +++ b/tests/qemu-iotests/181 @@ -26,7 +26,7 @@ echo "QA output

[PATCH 21/23] iotests/240: Create socket in $SOCK_DIR

2019-10-10 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/240 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/240 b/tests/qemu-iotests/240 index f73bc07d80..8b4337b58d 100755 --- a/tests/qemu-iotests/240 +++ b/tests/qemu-iotests/240 @@ -29,7 +29,7 @@ status=1

Re: [PATCH] qcow2-bitmaps: fix qcow2_can_store_new_dirty_bitmap

2019-10-10 Thread Eric Blake
On 6/7/19 1:53 PM, Vladimir Sementsov-Ogievskiy wrote: 07.06.2019 21:48, Vladimir Sementsov-Ogievskiy wrote: qcow2_can_store_new_dirty_bitmap works wrong, as it considers only bitmaps already stored in the qcow2 image and ignores persistent BdrvDirtyBitmap objects. So, let's instead count

Re: [PATCH 02/23] iotests.py: Store socket files in $SOCK_DIR

2019-10-10 Thread Eric Blake
On 10/10/19 10:24 AM, Max Reitz wrote: iotests.py itself does not store socket files, but it machine.py and s/it // qtest.py do. iotests.py needs to pass the respective path to them, and they need to adhere to it. Signed-off-by: Max Reitz --- python/qemu/machine.py| 15

Re: [PATCH 12/23] iotests/183: Create socket in $SOCK_DIR

2019-10-10 Thread Eric Blake
On 10/10/19 10:24 AM, Max Reitz wrote: Signed-off-by: Max Reitz --- tests/qemu-iotests/183 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake diff --git a/tests/qemu-iotests/183 b/tests/qemu-iotests/183 index 04fb344d08..bced83fae0 100755 ---

Re: [PATCH 13/23] iotests/192: Create socket in $SOCK_DIR

2019-10-10 Thread Eric Blake
On 10/10/19 10:24 AM, Max Reitz wrote: Signed-off-by: Max Reitz --- tests/qemu-iotests/192 | 4 ++-- tests/qemu-iotests/192.out | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc.

Re: [PATCH 15/23] iotests/201: Create socket in $SOCK_DIR

2019-10-10 Thread Eric Blake
On 10/10/19 10:24 AM, Max Reitz wrote: Signed-off-by: Max Reitz --- tests/qemu-iotests/201 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake diff --git a/tests/qemu-iotests/201 b/tests/qemu-iotests/201 index 7abf740fe4..86fa37e714 100755 ---

Re: [PATCH 22/23] iotests/267: Create socket in $SOCK_DIR

2019-10-10 Thread Eric Blake
On 10/10/19 10:24 AM, Max Reitz wrote: Signed-off-by: Max Reitz --- tests/qemu-iotests/267 | 4 ++-- tests/qemu-iotests/267.out | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc.

Re: [PATCH v3 3/8] hw/ide/piix: Convert reset handler to DeviceReset

2019-10-10 Thread Li Qiang
Philippe Mathieu-Daudé 于2019年10月10日周四 下午9:16写道: > The PIIX/IDE is a PCI device within a PIIX chipset, it will be reset > when the PCI bus it stands on is reset. > > Convert its reset handler into a proper Device reset method. > > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Li Qiang

  1   2   >