Re: [PULL 00/11] Q800 branch patches

2019-10-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20191028181643.5143-1-laur...@vivier.eu/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PULL 00/11] Q800 branch patches Type: series Message-id: 20191028181643.5143-1-laur...@vivier.eu === TEST

Re: [PATCH for-4.2 0/2] qcow2: Fix QCOW2_COMPRESSED_SECTOR_MASK

2019-10-28 Thread Alberto Garcia
On Mon 28 Oct 2019 05:18:39 PM CET, Max Reitz wrote: > This fixes a bug reported on > https://bugs.launchpad.net/qemu/+bug/185. The problem is that > QCOW2_COMPRESSED_SECTOR_MASK is a 32-bit mask when it really needs to be > a 64-bit mask. Ouch! Reviewed-by: Alberto Garcia Berto

Re: [PULL 00/69] Block patches for softfreeze

2019-10-28 Thread Peter Maydell
On Mon, 28 Oct 2019 at 12:15, Max Reitz wrote: > > The following changes since commit 187f35512106501fe9a11057f4d8705431e0026d: > > Merge remote-tracking branch > 'remotes/stsquad/tags/pull-testing-next-251019-3' into staging (2019-10-26 > 10:13:48 +0100) > > are available in the Git

[PULL 11/11] BootLinuxConsoleTest: Test the Quadra 800

2019-10-28 Thread Laurent Vivier
From: Philippe Mathieu-Daudé This test boots a Linux kernel on a Quadra 800 board and verify the serial is working. Example: $ avocado --show=app,console run -t machine:q800 tests/acceptance/boot_linux_console.py console: ABCFGHIJK console: Linux version 5.2.0-2-m68k

[PULL 07/11] hw/m68k: add Nubus support

2019-10-28 Thread Laurent Vivier
This patch adds basic support for the NuBus bus. This is used by 680x0 Macintosh. Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier Reviewed-by: Thomas Huth Message-Id: <20191026164546.30020-8-laur...@vivier.eu> ---

[PULL 05/11] hw/m68k: add VIA support

2019-10-28 Thread Laurent Vivier
Inside the 680x0 Macintosh, VIA (Versatile Interface Adapter) is used to interface the keyboard, Mouse, and real-time clock. It also provides control line for the floppy disk driver, video interface, sound circuitry and serial interface. This implementation is based on the MOS6522 object.

[PULL 03/11] esp: add pseudo-DMA as used by Macintosh

2019-10-28 Thread Laurent Vivier
There is no DMA in Quadra 800, so the CPU reads/writes the data from the PDMA register (offset 0x100, ESP_PDMA in hw/m68k/q800.c) and copies them to/from the memory. There is a nice assembly loop in the kernel to do that, see linux/drivers/scsi/mac_esp.c:MAC_ESP_PDMA_LOOP(). The start of the

[PULL 01/11] esp: move handle_ti_cmd() cleanup code to esp_do_dma().

2019-10-28 Thread Laurent Vivier
To prepare following patches move do_cmd and DMA special case from handle_ti() to esp_do_dma(). This part of the code must be only executed with real DMA, not with pseudo-DMA. And PDMA is detected in esp_do_dma(), so move this part of the code in esp_do_dma(). We keep the code in handle_ti_cmd()

[PULL 10/11] hw/m68k: define Macintosh Quadra 800

2019-10-28 Thread Laurent Vivier
If you want to test the machine, it doesn't yet boot a MacROM, but you can boot a linux kernel from the command line. You can install your own disk using debian-installer with: ./qemu-system-m68k \ -M q800 \ -serial none -serial mon:stdio \ -m 1000M -drive

[PULL 08/11] hw/m68k: add Nubus macfb video card

2019-10-28 Thread Laurent Vivier
This patch adds support for a graphic framebuffer device. This device can be added as a sysbus device or as a NuBus device. It is accessed as a framebuffer but the color palette can be set. Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier

[PULL 09/11] hw/m68k: add a dummy SWIM floppy controller

2019-10-28 Thread Laurent Vivier
SWIM (Sander-Wozniak Integrated Machine) is the floppy controller of the 680x0 Macintosh. This patch introduces only the basic support: it allows to switch from IWM (Integrated WOZ Machine) mode to the SWIM mode and makes the linux driver happy. It cannot read any floppy image. Co-developed-by:

[PULL 00/11] Q800 branch patches

2019-10-28 Thread Laurent Vivier
The following changes since commit 7bc8f9734213b76e76631a483be13d6737c2adbc: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20191025' into staging (2019-10-25 13:12:16 +0100) are available in the Git repository at: git://github.com/vivier/qemu-m68k.git

[PULL 04/11] dp8393x: manage big endian bus

2019-10-28 Thread Laurent Vivier
This is needed by Quadra 800, this card can run on little-endian or big-endian bus. Signed-off-by: Laurent Vivier Tested-by: Hervé Poussineau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Hervé Poussineau Message-Id: <20191026164546.30020-5-laur...@vivier.eu> --- hw/net/dp8393x.c | 88

[PULL 06/11] hw/m68k: implement ADB bus support for via

2019-10-28 Thread Laurent Vivier
VIA needs to be able to poll the ADB interface and to read/write data from/to the bus. This patch adds functions allowing that. Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier Reviewed-by: Hervé Poussineau Reviewed-by: Thomas Huth Message-Id:

[PULL 02/11] esp: move get_cmd() post-DMA code to get_cmd_cb()

2019-10-28 Thread Laurent Vivier
This will be needed to implement pseudo-DMA Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Acked-by: Paolo Bonzini Message-Id: <20191026164546.30020-3-laur...@vivier.eu> --- hw/scsi/esp.c | 46 +- 1 file changed, 29 insertions(+),

[PATCH for-4.2 1/2] qcow2: Fix QCOW2_COMPRESSED_SECTOR_MASK

2019-10-28 Thread Max Reitz
Masks for L2 table entries should have 64 bit. Fixes: b6c246942b14d3e0dec46a6c5868ed84e7dbea19 Buglink: https://bugs.launchpad.net/qemu/+bug/185 Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz --- block/qcow2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH for-4.2 0/2] qcow2: Fix QCOW2_COMPRESSED_SECTOR_MASK

2019-10-28 Thread Max Reitz
This fixes a bug reported on https://bugs.launchpad.net/qemu/+bug/185. The problem is that QCOW2_COMPRESSED_SECTOR_MASK is a 32-bit mask when it really needs to be a 64-bit mask. The launchpad report mentions only problems with qemu-img check on large compressed images, but I think it might

[PATCH for-4.2 2/2] iotests: Add test for 4G+ compressed qcow2 write

2019-10-28 Thread Max Reitz
Test what qemu-img check says about an image after one has written compressed data to an offset above 4 GB. Signed-off-by: Max Reitz --- tests/qemu-iotests/272 | 79 ++ tests/qemu-iotests/272.out | 10 + tests/qemu-iotests/group | 1 + 3 files

Re: [PATCH v2] qemu-img.texi: Describe data_file and data_file_raw

2019-10-28 Thread Max Reitz
On 21.10.19 03:14, Han Han wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1763105 > > Signed-off-by: Han Han > --- > qemu-img.texi | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/qemu-img.texi b/qemu-img.texi > index b5156d6316..983c6122f8 100644 > ---

Re: [RFC PATCH v2 02/26] qcow2: Split cluster_needs_cow() out of count_cow_clusters()

2019-10-28 Thread Vladimir Sementsov-Ogievskiy
27.10.2019 0:25, Alberto Garcia wrote: > We are going to need it in other places. > > Signed-off-by: Alberto Garcia Reviewed-by: Vladimir Sementsov-Ogievskiy > --- > block/qcow2-cluster.c | 34 +++--- > 1 file changed, 19 insertions(+), 15 deletions(-) > > diff

Re: [RFC PATCH v2 01/26] qcow2: Add calculate_l2_meta()

2019-10-28 Thread Vladimir Sementsov-Ogievskiy
27.10.2019 0:25, Alberto Garcia wrote: > handle_alloc() creates a QCowL2Meta structure in order to update the > image metadata and perform the necessary copy-on-write operations. > > This patch moves that code to a separate function so it can be used > from other places. > > Signed-off-by:

[PULL 69/69] qemu-iotests: restrict 264 to qcow2 only

2019-10-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy 264 is unprepared to run with different formats, for example luks needs handling keys, cloop doesn't support image creation, vpc creates image larger than requested (which breaks "Backup completed: 5242880" in test output). The test is here to check

[PULL 68/69] Revert "qemu-img: Check post-truncation size"

2019-10-28 Thread Max Reitz
This reverts commit 5279b30392da7a3248b320c75f20c61e3a95863c. We no longer need this check because exact=true forces the block driver to give the image the exact size requested by the user. Signed-off-by: Max Reitz Message-id: 20190918095144.955-9-mre...@redhat.com Reviewed-by: Maxim Levitsky

[PULL 65/69] block: Evaluate @exact in protocol drivers

2019-10-28 Thread Max Reitz
We have two protocol drivers that return success when trying to shrink a block device even though they cannot shrink it. This behavior is now only allowed with exact=false, so they should return an error with exact=true. Signed-off-by: Max Reitz Message-id:

[PULL 66/69] block: Let format drivers pass @exact

2019-10-28 Thread Max Reitz
When truncating a format node, the @exact parameter is generally handled simply by virtue of the format storing the new size in the image metadata. Such formats do not need to pass on the parameter to their file nodes. There are exceptions, though: - raw and crypto cannot store the image size,

[PULL 64/69] block: Add @exact parameter to bdrv_co_truncate()

2019-10-28 Thread Max Reitz
We have two drivers (iscsi and file-posix) that (in some cases) return success from their .bdrv_co_truncate() implementation if the block device is larger than the requested offset, but cannot be shrunk. Some callers do not want that behavior, so this patch adds a new parameter that they can use

[PULL 62/69] block/cor: Drop cor_co_truncate()

2019-10-28 Thread Max Reitz
No other filter driver has a .bdrv_co_truncate() implementation, and there is no need to because the general block layer code can handle it just as well. Signed-off-by: Max Reitz Message-id: 20190918095144.955-3-mre...@redhat.com Reviewed-by: Maxim Levitsky Signed-off-by: Max Reitz ---

[PULL 59/69] iotests: Add peek_file* functions

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20191011152814.14791-16-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/common.rc | 20 1 file changed, 20 insertions(+) diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc

[PULL 63/69] block: Do not truncate file node when formatting

2019-10-28 Thread Max Reitz
There is no reason why the format drivers need to truncate the protocol node when formatting it. When using the old .bdrv_co_create_ops() interface, the file will be created with no size option anyway, which generally gives it a size of 0. (Exceptions are block devices, which cannot be truncated

[PULL 58/69] qcow2: Fix v3 snapshot table entry compliancy

2019-10-28 Thread Max Reitz
qcow2 v3 images require every snapshot table entry to have at least 16 bytes of extra data. If they do not, let qemu-img check -r all fix it. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20191011152814.14791-15-mre...@redhat.com Signed-off-by: Max Reitz ---

[PULL 57/69] qcow2: Repair snapshot table with too many entries

2019-10-28 Thread Max Reitz
The user cannot choose which snapshots are removed. This is fine because we have chosen the maximum snapshot table size to be so large (65536 entries) that it cannot be reasonably reached. If the snapshot table exceeds this size, the image has probably been corrupted in some way; in this case,

[PULL 56/69] qcow2: Fix overly long snapshot tables

2019-10-28 Thread Max Reitz
We currently refuse to open qcow2 images with overly long snapshot tables. This patch makes qemu-img check -r all drop all offending entries past what we deem acceptable. The user cannot choose which snapshots are removed. This is fine because we have chosen the maximum snapshot table size to

[PULL 51/69] qcow2: Write v3-compliant snapshot list on upgrade

2019-10-28 Thread Max Reitz
qcow2 v3 requires every snapshot table entry to have two extra data fields: The 64-bit VM state size, and the virtual disk size. Both are optional for v2 images, so they may not be present. qcow2_upgrade() therefore should update the snapshot table to ensure all entries have these extra data

[PULL 52/69] qcow2: Separate qcow2_check_read_snapshot_table()

2019-10-28 Thread Max Reitz
Reading the snapshot table can fail. That is a problem when we want to repair the image. Therefore, stop reading the snapshot table in qcow2_do_open() in check mode. Instead, add a new function qcow2_check_read_snapshot_table() that reads the snapshot table at a later point. In the future, we

[PULL 53/69] qcow2: Add qcow2_check_fix_snapshot_table()

2019-10-28 Thread Max Reitz
qcow2_check_read_snapshot_table() can perform consistency checks, but it cannot fix everything. Specifically, it cannot allocate new clusters, because that should wait until the refcount structures are known to be consistent (i.e., after qcow2_check_refcounts()). Thus, it cannot call

[PULL 48/69] qcow2: Keep unknown extra snapshot data

2019-10-28 Thread Max Reitz
The qcow2 specification says to ignore unknown extra data fields in snapshot table entries. Currently, we discard it whenever we update the image, which is a bit different from "ignore". This patch makes the qcow2 driver keep all unknown extra data fields when updating an image's snapshot table.

[PULL 43/69] block/nvme: add support for discard

2019-10-28 Thread Max Reitz
From: Maxim Levitsky Signed-off-by: Maxim Levitsky Message-id: 20190913133627.28450-3-mlevi...@redhat.com Reviewed-by: John Snow Signed-off-by: Max Reitz --- block/nvme.c | 83 ++ block/trace-events | 2 ++ 2 files changed, 85 insertions(+)

[PULL 50/69] qcow2: Put qcow2_upgrade() into its own function

2019-10-28 Thread Max Reitz
This does not make sense right now, but it will make sense once we need to do more than to just update s->qcow_version. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20191011152814.14791-7-mre...@redhat.com Signed-off-by: Max Reitz --- block/qcow2.c | 43

[PULL 41/69] block/block-copy: increase buffered copy request

2019-10-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy No reason to limit buffered copy to one cluster. Let's allow up to 1 MiB. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-id: 20191022111805.3432-7-vsement...@virtuozzo.com Signed-off-by: Max Reitz --- include/block/block-copy.h

[PULL 39/69] util: introduce SharedResource

2019-10-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Introduce an API for some shared splittable resource, like memory. It's going to be used by backup. Backup uses both read/write io and copy_range. copy_range may consume memory implictly, so the new API is abstract: it doesn't allocate any real memory but only

[PULL 37/69] block/block-copy: limit copy_range_size to 16 MiB

2019-10-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Large copy range may imply memory allocation and large io effort, so using 2G copy range request may be bad idea. Let's limit it to 16 MiB. It also helps the following patch to refactor copy-with-offload fallback to copy-with-bounce-buffer. Note, that total

[PULL 40/69] block/block-copy: add memory limit

2019-10-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Currently total allocation for parallel requests to block-copy instance is unlimited. Let's limit it to 128 MiB. For now block-copy is used only in backup, so actually we limit total allocation for backup job. Signed-off-by: Vladimir Sementsov-Ogievskiy

[PULL 45/69] include: Move endof() up from hw/virtio/virtio.h

2019-10-28 Thread Max Reitz
endof() is a useful macro, we can make use of it outside of virtio. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20191011152814.14791-2-mre...@redhat.com Signed-off-by: Max Reitz --- include/hw/virtio/virtio.h | 7 --- include/qemu/compiler.h| 7 +++

[PULL 67/69] block: Pass truncate exact=true where reasonable

2019-10-28 Thread Max Reitz
This is a change in behavior, so all instances need a good justification. The comments added here should explain my reasoning. qed already had a comment that suggests it always expected bdrv_truncate()/blk_truncate() to behave as if exact=true were passed (c743849bee7 came eight months before

[PULL 60/69] iotests: Test qcow2's snapshot table handling

2019-10-28 Thread Max Reitz
Add a test how our qcow2 driver handles extra data in snapshot table entries, and how it repairs overly long snapshot tables. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20191011152814.14791-17-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/261 | 523

[PULL 47/69] qcow2: Add Error ** to qcow2_read_snapshots()

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20191011152814.14791-4-mre...@redhat.com Signed-off-by: Max Reitz --- block/qcow2.h | 2 +- block/qcow2-snapshot.c | 7 ++- block/qcow2.c | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git

[PULL 42/69] block/nvme: add support for write zeros

2019-10-28 Thread Max Reitz
From: Maxim Levitsky Signed-off-by: Maxim Levitsky Message-id: 20190913133627.28450-2-mlevi...@redhat.com Reviewed-by: John Snow Signed-off-by: Max Reitz --- include/block/nvme.h | 19 +++- block/nvme.c | 72 +++- block/trace-events |

[PULL 34/69] iotests/267: Create socket in $SOCK_DIR

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20191017133155.5327-23-mre...@redhat.com Reviewed-by: Thomas Huth 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

[PULL 46/69] qcow2: Use endof()

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20191011152814.14791-3-mre...@redhat.com Signed-off-by: Max Reitz --- block/qcow2-snapshot.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c index

[PULL 44/69] mirror: Do not dereference invalid pointers

2019-10-28 Thread Max Reitz
mirror_exit_common() may be called twice (if it is called from mirror_prepare() and fails, it will be called from mirror_abort() again). In such a case, many of the pointers in the MirrorBlockJob object will already be freed. This can be seen most reliably for s->target, which is set to NULL

[PULL 61/69] block: Handle filter truncation like native impl.

2019-10-28 Thread Max Reitz
Make the filter truncation (passing it through to bs->file) a first-class citizen and handle it exactly as if it was the filter driver's native implementation of .bdrv_co_truncate(). I do not see a reason not to, it makes the code a bit shorter, and may be even more correct because this gets us

[PULL 30/69] iotests/209: Create socket in $SOCK_DIR

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20191017133155.5327-19-mre...@redhat.com 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

[PULL 31/69] iotests/222: Create socket in $SOCK_DIR

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20191017133155.5327-20-mre...@redhat.com 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

[PULL 55/69] qcow2: Keep track of the snapshot table length

2019-10-28 Thread Max Reitz
When repairing the snapshot table, we truncate entries that have too much extra data. This frees up space that we do not have to count towards the snapshot table size. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20191011152814.14791-12-mre...@redhat.com Signed-off-by: Max

[PULL 54/69] qcow2: Fix broken snapshot table entries

2019-10-28 Thread Max Reitz
The only case where we currently reject snapshot table entries is when they have too much extra data. Fix them with qemu-img check -r all by counting it as a corruption, reducing their extra_data_size, and then letting qcow2_check_fix_snapshot_table() do the rest. Signed-off-by: Max Reitz

[PULL 25/69] iotests/192: Create socket in $SOCK_DIR

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20191017133155.5327-14-mre...@redhat.com Reviewed-by: Thomas Huth 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

[PULL 38/69] block/block-copy: refactor copying

2019-10-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Merge copying code into one function block_copy_do_copy, which only calls bdrv_ io functions and don't do any synchronization (like dirty bitmap set/reset). Refactor block_copy() function so that it takes full decision about size of chunk to be copied and does

[PULL 49/69] qcow2: Make qcow2_write_snapshots() public

2019-10-28 Thread Max Reitz
Updating the snapshot list will be useful when upgrading a v2 image to v3, so we will need to call this function in qcow2.c. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20191011152814.14791-6-mre...@redhat.com Signed-off-by: Max Reitz --- block/qcow2.h | 1 +

[PULL 36/69] block/block-copy: allocate buffer in block_copy_with_bounce_buffer

2019-10-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Move bounce_buffer allocation block_copy_with_bounce_buffer. This commit simplifies further work on implementing copying by larger chunks (of different size) and further asynchronous handling of block_copy iterations (with help of block/aio_task API).

[PULL 33/69] iotests/240: Create socket in $SOCK_DIR

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20191017133155.5327-22-mre...@redhat.com Reviewed-by: Thomas Huth Signed-off-by: Max Reitz --- tests/qemu-iotests/240 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/240

[PULL 32/69] iotests/223: Create socket in $SOCK_DIR

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20191017133155.5327-21-mre...@redhat.com Reviewed-by: Thomas Huth Signed-off-by: Max Reitz --- tests/qemu-iotests/223 | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/qemu-iotests/223

[PULL 29/69] iotests/208: Create socket in $SOCK_DIR

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20191017133155.5327-18-mre...@redhat.com 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

[PULL 35/69] iotests: Drop TEST_DIR filter from _filter_nbd

2019-10-28 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 Reviewed-by: Eric Blake Message-id: 20191017133155.5327-24-mre...@redhat.com Reviewed-by: Thomas Huth Signed-off-by: Max Reitz ---

[PULL 27/69] iotests/201: Create socket in $SOCK_DIR

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20191017133155.5327-16-mre...@redhat.com Reviewed-by: Thomas Huth Signed-off-by: Max Reitz --- tests/qemu-iotests/201 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/201

[PULL 20/69] iotests/143: Create socket in $SOCK_DIR

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Thomas Huth Message-id: 20191017133155.5327-9-mre...@redhat.com 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

[PULL 26/69] iotests/194: Create sockets in $SOCK_DIR

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20191017133155.5327-15-mre...@redhat.com 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

[PULL 28/69] iotests/205: Create socket in $SOCK_DIR

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20191017133155.5327-17-mre...@redhat.com Reviewed-by: Thomas Huth Signed-off-by: Max Reitz --- tests/qemu-iotests/205 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/205

[PULL 21/69] iotests/147: Create socket in $SOCK_DIR

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Thomas Huth Message-id: 20191017133155.5327-10-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/147 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/147

[PULL 23/69] iotests/182: Create socket in $SOCK_DIR

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Thomas Huth Message-id: 20191017133155.5327-12-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/182 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/182

[PULL 19/69] iotests/140: Create socket in $SOCK_DIR

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Thomas Huth Message-id: 20191017133155.5327-8-mre...@redhat.com 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

[PULL 12/69] Revert "mirror: Only mirror granularity-aligned chunks"

2019-10-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy This reverts commit 9adc1cb49af8d4e54f57980b1eed5c0a4b2dafa6. "mirror: Only mirror granularity-aligned chunks" Since previous commit unaligned chunks are supported by do_sync_target_write. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max

[PULL 24/69] iotests/183: Create socket in $SOCK_DIR

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Thomas Huth Message-id: 20191017133155.5327-13-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/183 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/183

[PULL 14/69] iotests.py: Store socket files in $SOCK_DIR

2019-10-28 Thread Max Reitz
iotests.py itself does not store socket files, but 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 Reviewed-by: Eric Blake Reviewed-by: Thomas Huth Message-id: 20191017133155.5327-3-mre...@redhat.com

[PULL 18/69] iotests/083: Create socket in $SOCK_DIR

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Thomas Huth Message-id: 20191017133155.5327-7-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/083 | 6 +++--- tests/qemu-iotests/083.out | 34 +- 2 files changed, 20

[PULL 22/69] iotests/181: Create socket in $SOCK_DIR

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Thomas Huth Message-id: 20191017133155.5327-11-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/181 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/181

[PULL 13/69] iotests: Introduce $SOCK_DIR

2019-10-28 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

[PULL 16/69] iotests: Filter $SOCK_DIR

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20191017133155.5327-5-mre...@redhat.com Reviewed-by: Thomas Huth Signed-off-by: Max Reitz --- tests/qemu-iotests/common.filter | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/common.filter

[PULL 11/69] block/mirror: support unaligned write in active mirror

2019-10-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Prior 9adc1cb49af8d do_sync_target_write had a bug: it reset aligned-up region in the dirty bitmap, which means that we may not copy some bytes and assume them copied, which actually leads to producing corrupted target. So 9adc1cb49af8d forced dirty bitmap

[PULL 10/69] block/block-backend: add blk_co_pwritev_part

2019-10-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Add blk write function with qiov_offset parameter. It's needed for the following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-id: 20191011090711.19940-4-vsement...@virtuozzo.com Signed-off-by: Max Reitz ---

[PULL 17/69] iotests: Let common.nbd create socket in $SOCK_DIR

2019-10-28 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 Reviewed-by: Eric Blake Message-id: 20191017133155.5327-6-mre...@redhat.com Reviewed-by: Thomas Huth Signed-off-by: Max Reitz --- tests/qemu-iotests/241| 2 --

[PULL 05/69] iotests: Test driver whitelisting in 093

2019-10-28 Thread Max Reitz
null-aio may not be whitelisted. Skip all test cases that require it. (And skip the whole test if null-co is not whitelisted.) Signed-off-by: Max Reitz Message-id: 20190917092004.999-6-mre...@redhat.com Reviewed-by: Andrey Shinkevich Reviewed-by: John Snow Signed-off-by: Max Reitz ---

[PULL 09/69] block/mirror: simplify do_sync_target_write

2019-10-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy do_sync_target_write is called from bdrv_mirror_top_do_write after write/discard operation, all inside active_write/active_write_settle protecting us from mirror iteration. So the whole area is dirty for sure, no reason to examine dirty bitmap. Signed-off-by:

[PULL 15/69] iotests.py: Add @base_dir to FilePaths etc.

2019-10-28 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 Reviewed-by: Eric Blake Message-id: 20191017133155.5327-4-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py |

[PULL 08/69] hbitmap: handle set/reset with zero length

2019-10-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Passing zero length to these functions leads to unpredicted results. Zero-length set/reset may occur in active-mirror, on zero-length write (which is unlikely, but not guaranteed to never happen). Let's just do nothing on zero-length request. Signed-off-by:

[PULL 07/69] iotests: Cache supported_formats()

2019-10-28 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: John Snow Message-id: 20190917092004.999-8-mre...@redhat.com Reviewed-by: Andrey Shinkevich Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git

[PULL 04/69] iotests: Let skip_if_unsupported accept a function

2019-10-28 Thread Max Reitz
This lets tests use skip_if_unsupported() with a potentially variable list of required formats. Suggested-by: Kevin Wolf Signed-off-by: Max Reitz Message-id: 20190917092004.999-5-mre...@redhat.com Reviewed-by: Andrey Shinkevich Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 8

[PULL 06/69] iotests: Test driver whitelisting in 136

2019-10-28 Thread Max Reitz
null-aio may not be whitelisted. Skip all test cases that require it. Signed-off-by: Max Reitz Message-id: 20190917092004.999-7-mre...@redhat.com Reviewed-by: Andrey Shinkevich Reviewed-by: John Snow Signed-off-by: Max Reitz --- tests/qemu-iotests/136 | 14 ++ 1 file changed, 10

[PULL 00/69] Block patches for softfreeze

2019-10-28 Thread Max Reitz
The following changes since commit 187f35512106501fe9a11057f4d8705431e0026d: Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-next-251019-3' into staging (2019-10-26 10:13:48 +0100) are available in the Git repository at: https://github.com/XanClic/qemu.git

[PULL 03/69] iotests: Use case_skip() in skip_if_unsupported()

2019-10-28 Thread Max Reitz
skip_if_unsupported() should use the stronger variant case_skip(), because this allows it to be used even with setUp() (in a meaningful way). In the process, make it explicit what we expect the first argument of the func_wrapper to be (namely something derived of QMPTestCase). Signed-off-by: Max

[PULL 02/69] iotests: Allow skipping test cases

2019-10-28 Thread Max Reitz
case_notrun() does not actually skip the current test case. It just adds a "notrun" note and then returns to the caller, who manually has to skip the test. Generally, skipping a test case is as simple as returning from the current function, but not always: For example, this model does not allow

[PULL 01/69] iotests: Prefer null-co over null-aio

2019-10-28 Thread Max Reitz
We use null-co basically everywhere in the iotests. Unless we want to test null-aio specifically, we should use it instead (for consistency). Signed-off-by: Max Reitz Reviewed-by: John Snow Reviewed-by: Thomas Huth Message-id: 20190917092004.999-2-mre...@redhat.com Reviewed-by: Andrey

Re: [PATCH] qemu-iotests: restrict 264 to qcow2 only

2019-10-28 Thread Max Reitz
On 25.10.19 17:38, Eric Blake wrote: > On 10/25/19 9:50 AM, Vladimir Sementsov-Ogievskiy wrote: >> 264 is unprepared to run with different formats, for example luks needs >> handling keys, cloop doesn't support image creation, vpc creates image >> larger than requested (which breaks "Backup

Re: [PATCH v3 2/4] blkdebug: Allow taking/unsharing permissions

2019-10-28 Thread Vladimir Sementsov-Ogievskiy
28.10.2019 13:46, Max Reitz wrote: > On 16.10.19 13:13, Vladimir Sementsov-Ogievskiy wrote: >> 14.10.2019 18:39, Max Reitz wrote: >>> Sometimes it is useful to be able to add a node to the block graph that >>> takes or unshare a certain set of permissions for debugging purposes. >>> This patch

Re: [PATCH 4/8] block: Add @exact parameter to bdrv_co_truncate()

2019-10-28 Thread Max Reitz
On 18.09.19 22:50, Maxim Levitsky wrote: > On Wed, 2019-09-18 at 11:51 +0200, Max Reitz wrote: >> We have two drivers (iscsi and file-posix) that (in some cases) return >> success from their .bdrv_co_truncate() implementation if the block >> device is larger than the requested offset, but cannot

Re: [RFC 0/3] block/file-posix: Work around XFS bug

2019-10-28 Thread Vladimir Sementsov-Ogievskiy
28.10.2019 14:04, Kevin Wolf wrote: > Am 27.10.2019 um 13:35 hat Stefan Hajnoczi geschrieben: >> On Fri, Oct 25, 2019 at 11:58:46AM +0200, Max Reitz wrote: >>> As for how we can address the issue, I see three ways: >>> (1) The one presented in this series: On XFS with aio=native, we extend >>>

Re: [PATCH 7/8] block: Pass truncate exact=true where reasonable

2019-10-28 Thread Max Reitz
On 18.09.19 22:52, Maxim Levitsky wrote: > On Wed, 2019-09-18 at 11:51 +0200, Max Reitz wrote: >> This is a change in behavior, so all instances need a good >> justification. The comments added here should explain my reasoning. >> >> qed already had a comment that suggests it always expected >>

Re: [PATCH 0/8] block: Add @exact parameter to bdrv_co_truncate()

2019-10-28 Thread Max Reitz
On 18.09.19 11:51, Max Reitz wrote: > Hi, > > This series is supposed to pull out some of the problems from my > “Generic file creation fallback” series. > > The blk_truncate_for_formatting() function added there was buggy, as > Maxim noted, in that it did not check whether blk_truncate()

Re: [RFC 0/3] block/file-posix: Work around XFS bug

2019-10-28 Thread Vladimir Sementsov-Ogievskiy
28.10.2019 13:10, Max Reitz wrote: > On 28.10.19 11:07, Vladimir Sementsov-Ogievskiy wrote: >> 28.10.2019 12:56, Max Reitz wrote: >>> On 28.10.19 10:30, Max Reitz wrote: On 28.10.19 10:24, Max Reitz wrote: > On 27.10.19 13:35, Stefan Hajnoczi wrote: >> On Fri, Oct 25, 2019 at

Re: [RFC 0/3] block/file-posix: Work around XFS bug

2019-10-28 Thread Kevin Wolf
Am 27.10.2019 um 13:35 hat Stefan Hajnoczi geschrieben: > On Fri, Oct 25, 2019 at 11:58:46AM +0200, Max Reitz wrote: > > As for how we can address the issue, I see three ways: > > (1) The one presented in this series: On XFS with aio=native, we extend > > tracked requests for post-EOF

Re: [PATCH v3 00/16] qcow2: Let check -r all repair some snapshot bits

2019-10-28 Thread Max Reitz
On 11.10.19 17:27, Max Reitz wrote: > Hi, > > The v1 cover letter explained this series’s purpose: > https://lists.nongnu.org/archive/html/qemu-block/2019-07/msg01290.html > > The v2 cover letter explained the v2 changes: > https://lists.nongnu.org/archive/html/qemu-block/2019-08/msg00921.html >

  1   2   >