Re: [PATCH v3 23/31] iotests: switch to AQMP

2022-01-14 Thread Eric Blake
On Mon, Jan 10, 2022 at 06:29:02PM -0500, John Snow wrote: > Simply import the type defition from the new location. definition > > Signed-off-by: John Snow > Reviewed-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Beraldo Leal > --- > tests/qemu-iotests/iotests.py | 2 +- > 1 file changed,

Re: [PATCH v3 06/19] block: intoduce reqlist

2022-01-14 Thread Hanna Reitz
On 22.12.21 18:40, Vladimir Sementsov-Ogievskiy wrote: Split intersecting-requests functionality out of block-copy to be reused in copy-before-write filter. Note: while being here, fix tiny typo in MAINTAINERS. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/reqlist.h | 67

Re: [PATCH v3 05/19] block/block-copy: add block_copy_reset()

2022-01-14 Thread Hanna Reitz
On 22.12.21 18:40, Vladimir Sementsov-Ogievskiy wrote: Split block_copy_reset() out of block_copy_reset_unallocated() to be used separately later. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 1 + block/block-copy.c | 21 + 2

Re: [PATCH v3 04/19] block/copy-before-write: add bitmap open parameter

2022-01-14 Thread Hanna Reitz
On 22.12.21 18:40, Vladimir Sementsov-Ogievskiy wrote: This brings "incremental" mode to copy-before-write filter: user can specify bitmap so that filter will copy only "dirty" areas. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 10 +-

Re: [PATCH v3 03/19] block/block-copy: block_copy_state_new(): add bitmap parameter

2022-01-14 Thread Hanna Reitz
On 22.12.21 18:40, Vladimir Sementsov-Ogievskiy wrote: This will be used in the following commit to bring "incremental" mode to copy-before-write filter. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 2 +- block/block-copy.c | 14 --

Re: [PATCH v3 02/19] block/dirty-bitmap: bdrv_merge_dirty_bitmap(): add return value

2022-01-14 Thread Hanna Reitz
On 22.12.21 18:40, Vladimir Sementsov-Ogievskiy wrote: That simplifies handling failure in existing code and in further new usage of bdrv_merge_dirty_bitmap(). Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/dirty-bitmap.h| 2 +- block/dirty-bitmap.c| 9

Re: [PATCH v3 01/19] block/block-copy: move copy_bitmap initialization to block_copy_state_new()

2022-01-14 Thread Hanna Reitz
On 22.12.21 18:40, Vladimir Sementsov-Ogievskiy wrote: We are going to complicate bitmap initialization in the further commit. And in future, backup job will be able to work without filter (when source is immutable), so we'll need same bitmap initialization in copy-before-write filter and in

Re: [RFC PATCH] block/file-posix: Remove a deprecation warning on macOS 12

2022-01-14 Thread Hanna Reitz
On 06.01.22 00:56, Philippe Mathieu-Daudé wrote: When building on macOS 12 we get: ../block/file-posix.c:3335:18: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations] kernResult = IOMasterPort( MACH_PORT_NULL, );

Re: [RFC PATCH] block/file-posix: Remove a deprecation warning on macOS 12

2022-01-14 Thread Hanna Reitz
On 14.01.22 15:15, Philippe Mathieu-Daudé wrote: On 14/1/22 15:09, Hanna Reitz wrote: On 06.01.22 00:56, Philippe Mathieu-Daudé wrote: When building on macOS 12 we get:    ../block/file-posix.c:3335:18: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0

Re: [RFC PATCH] block/file-posix: Remove a deprecation warning on macOS 12

2022-01-14 Thread Philippe Mathieu-Daudé via
On 14/1/22 15:09, Hanna Reitz wrote: On 06.01.22 00:56, Philippe Mathieu-Daudé wrote: When building on macOS 12 we get:    ../block/file-posix.c:3335:18: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]    kernResult = IOMasterPort(

Re: [PULL 07/16] qapi/block: Restrict vhost-user-blk to CONFIG_VHOST_USER_BLK_SERVER

2022-01-14 Thread Philippe Mathieu-Daudé via
On 14/1/22 14:52, Kevin Wolf wrote: From: Philippe Mathieu-Daudé When building QEMU with --disable-vhost-user and using introspection, query-qmp-schema lists vhost-user-blk even though it's not actually available: { "execute": "query-qmp-schema" } { "return": [ ...

[PULL 12/16] vvfat: Fix vvfat_write() for writes before the root directory

2022-01-14 Thread Kevin Wolf
The calculation in sector2cluster() is done relative to the offset of the root directory. Any writes to blocks before the start of the root directory (in particular, writes to the FAT) result in negative values, which are not handled correctly in vvfat_write(). This changes sector2cluster() to

[PULL 10/16] iotests/308: Fix for CAP_DAC_OVERRIDE

2022-01-14 Thread Kevin Wolf
From: Hanna Reitz With CAP_DAC_OVERRIDE (which e.g. root generally has), permission checks will be bypassed when opening files. 308 in one instance tries to open a read-only file (FUSE export) with qemu-io as read/write, and expects this to fail. However, when running it as root, opening will

[PULL 16/16] iotests/testrunner.py: refactor test_field_width

2022-01-14 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy A lot of Optional[] types doesn't make code beautiful. test_field_width defaults to 8, but that is never used in the code. More over, if we want some default behavior for single call of test_run(), it should just print the whole test name, not limiting or

[PULL 14/16] qemu-img: make is_allocated_sectors() more efficient

2022-01-14 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Consider the case when the whole buffer is zero and end is unaligned. If i <= tail, we return 1 and do one unaligned WRITE, RMW happens. If i > tail, we do on aligned WRITE_ZERO (or skip if target is zeroed) and again one unaligned WRITE, RMW happens. Let's

[PULL 11/16] vvfat: Fix size of temporary qcow file

2022-01-14 Thread Kevin Wolf
The size of the qcow size was calculated so that only the FAT partition would fit on it, but not the whole disk. However, offsets relative to the whole disk are used to access it, so increase its size to be large enough for that. Signed-off-by: Kevin Wolf Message-Id:

[PULL 06/16] qemu-storage-daemon: Add vhost-user-blk help

2022-01-14 Thread Kevin Wolf
From: Philippe Mathieu-Daudé Add missing vhost-user-blk help: $ qemu-storage-daemon -h ... --export [type=]vhost-user-blk,id=,node-name=, addr.type=unix,addr.path=[,writable=on|off] [,logical-block-size=][,num-queues=] export the

[PULL 04/16] softmmu: fix device deletion events with -device JSON syntax

2022-01-14 Thread Kevin Wolf
From: Daniel P. Berrangé The -device JSON syntax impl leaks a reference on the created DeviceState instance. As a result when you hot-unplug the device, the device_finalize method won't be called and thus it will fail to emit the required DEVICE_DELETED event. A 'json-cli' feature was

[PULL 15/16] block: drop BLK_PERM_GRAPH_MOD

2022-01-14 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy First, this permission never protected a node from being changed, as generic child-replacing functions don't check it. Second, it's a strange thing: it presents a permission of parent node to change its child. But generally, children are replaced by different

[PULL 13/16] iotests: Test qemu-img convert of zeroed data cluster

2022-01-14 Thread Kevin Wolf
This demonstrates what happens when the block status changes in sub-min_sparse granularity, but all of the parts are zeroed out. The alignment logic in is_allocated_sectors() prevents that the target image remains fully sparse as expected, but turns it into a data cluster of explicit zeros.

[PULL 02/16] include/sysemu/blockdev.h: remove drive_mark_claimed_by_board and inline drive_def

2022-01-14 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito drive_def is only a particular use case of qemu_opts_parse_noisily, so it can be inlined. Also remove drive_mark_claimed_by_board, as it is only defined but not implemented (nor used) anywhere. Signed-off-by: Emanuele Giuseppe Esposito Message-Id:

[PULL 09/16] iotests/stream-error-on-reset: New test

2022-01-14 Thread Kevin Wolf
From: Hanna Reitz Test the following scenario: - Simple stream block in two-layer backing chain (base and top) - The job is drained via blk_drain(), then an error occurs while the job settles the ongoing request - And so the job completes while in blk_drain() This was reported as a segfault,

[PULL 07/16] qapi/block: Restrict vhost-user-blk to CONFIG_VHOST_USER_BLK_SERVER

2022-01-14 Thread Kevin Wolf
From: Philippe Mathieu-Daudé When building QEMU with --disable-vhost-user and using introspection, query-qmp-schema lists vhost-user-blk even though it's not actually available: { "execute": "query-qmp-schema" } { "return": [ ... { "name": "312",

[PULL 03/16] include/sysemu/blockdev.h: remove drive_get_max_devs

2022-01-14 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Remove drive_get_max_devs, as it is not used by anyone. Last use was removed in commit 8f2d75e81d5 ("hw: Drop superfluous special checks for orphaned -drive"). Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan

[PULL 05/16] docs: Correct 'vhost-user-blk' spelling

2022-01-14 Thread Kevin Wolf
From: Philippe Mathieu-Daudé Reported-by: Eric Blake Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20220107105420.395011-2-f4...@amsat.org> Signed-off-by: Kevin Wolf --- docs/tools/qemu-storage-daemon.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PULL 08/16] block-backend: prevent dangling BDS pointers across aio_poll()

2022-01-14 Thread Kevin Wolf
From: Stefan Hajnoczi The BlockBackend root child can change when aio_poll() is invoked. This happens when a temporary filter node is removed upon blockjob completion, for example. Functions in block/block-backend.c must be aware of this when using a blk_bs() pointer across aio_poll() because

[PULL 01/16] block_int: make bdrv_backing_overridden static

2022-01-14 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito bdrv_backing_overridden is only used in block.c, so there is no need to leave it in block_int.h Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi Message-Id: <20211215121140.456939-2-eespo...@redhat.com> Signed-off-by: Kevin Wolf ---

[PULL 00/16] Block layer patches

2022-01-14 Thread Kevin Wolf
The following changes since commit 67b6526cf042f22521feff5ea521a05d3dd2bf8f: Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging (2022-01-13 13:59:56 +) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you

Re: [PULL 0/6] Block patches

2022-01-14 Thread Peter Maydell
On Wed, 12 Jan 2022 at 17:14, Stefan Hajnoczi wrote: > > The following changes since commit 91f5f7a5df1fda8c34677a7c49ee8a4bb5b56a36: > > Merge remote-tracking branch > 'remotes/lvivier-gitlab/tags/linux-user-for-7.0-pull-request' into staging > (2022-01-12 11:51:47 +) > > are available

Re: [PATCH 0/2] block-backend: Retain permissions after migration

2022-01-14 Thread Hanna Reitz
On 25.11.21 14:53, Hanna Reitz wrote: Hi, Peng Liang has reported an issue regarding migration of raw images here: https://lists.nongnu.org/archive/html/qemu-block/2021-11/msg00673.html It turns out that after migrating, all permissions are shared when they weren’t before. The cause of the

Re: [PATCH 0/2] block-backend: Retain permissions after migration

2022-01-14 Thread Hanna Reitz
On 10.01.22 12:51, Peng Liang wrote: On 11/25/2021 9:53 PM, Hanna Reitz wrote: Hi, Peng Liang has reported an issue regarding migration of raw images here: https://lists.nongnu.org/archive/html/qemu-block/2021-11/msg00673.html It turns out that after migrating, all permissions are shared when

Re: [PATCH V2 for-6.2 0/2] fixes for bdrv_co_block_status

2022-01-14 Thread Ilya Dryomov
On Thu, Jan 13, 2022 at 3:44 PM Peter Lieven wrote: > > V1->V2: > Patch 1: Treat a hole just like an unallocated area. [Ilya] > Patch 2: Apply workaround only for pre-Quincy librbd versions and > ensure default striping and non child images. [Ilya] > > Peter Lieven (2): > block/rbd:

Re: [PATCH V2 for-6.2 2/2] block/rbd: workaround for ceph issue #53784

2022-01-14 Thread Ilya Dryomov
On Thu, Jan 13, 2022 at 3:44 PM Peter Lieven wrote: > > librbd had a bug until early 2022 that affected all versions of ceph that > supported fast-diff. This bug results in reporting of incorrect offsets > if the offset parameter to rbd_diff_iterate2 is not object aligned. > > This patch works

Re: [PATCH v2 2/2] qapi/block: Restrict vhost-user-blk to CONFIG_VHOST_USER_BLK_SERVER

2022-01-14 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > When building QEMU with --disable-vhost-user and using introspection, > query-qmp-schema lists vhost-user-blk even though it's not actually > available: > > { "execute": "query-qmp-schema" } > { > "return": [ > ... > { >