[PATCH v2 1/2] block/export: Conditionally ignore set-context error

2021-06-24 Thread Max Reitz
othread options") Signed-off-by: Max Reitz --- block/export/export.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/block/export/export.c b/block/export/export.c index fec7d9f738..6d3b9964c8 100644 --- a/block/export/export.c +++ b/block/export/export.c @@ -111,6 +

[PATCH v2 0/2] block/export: Conditionally ignore set-context error

2021-06-24 Thread Max Reitz
iothread conflict for exports' Max Reitz (2): block/export: Conditionally ignore set-context error iotests/307: Test iothread conflict for exports block/export/export.c | 5 - tests/qemu-iotests/307 | 15 +++ tests/qemu-iotests/307.out | 8 3 files changed, 27

Re: [PATCH v4 7/7] block: detect DKIOCGETBLOCKCOUNT/SIZE before use

2021-06-23 Thread Max Reitz
On 08.06.21 15:16, Paolo Bonzini wrote: From: Joelle van Dyne iOS hosts do not have these defined so we fallback to the default behaviour. Co-authored-by: Warner Losh Reviewed-by: Peter Maydell Signed-off-by: Joelle van Dyne Message-Id: <20210315180341.31638-...@getutm.app> Signed-off-by:

Re: [PATCH v4 5/7] block: feature detection for host block support

2021-06-23 Thread Max Reitz
On 08.06.21 15:16, Paolo Bonzini wrote: From: Joelle van Dyne On Darwin (iOS), there are no system level APIs for directly accessing host block devices. We detect this at configure time. Signed-off-by: Joelle van Dyne Message-Id: <20210315180341.31638-...@getutm.app> Signed-off-by: Paolo

Re: [PATCH v4 1/7] file-posix: fix max_iov for /dev/sg devices

2021-06-23 Thread Max Reitz
On 08.06.21 21:14, Vladimir Sementsov-Ogievskiy wrote: 08.06.2021 16:16, Paolo Bonzini wrote: Even though it was only called for devices that have bs->sg set (which must be character devices), sg_get_max_segments looked at /sys/dev/block which only works for block devices. On Linux the sg

[PATCH v2 6/6] block/iscsi: Do not force-cap *pnum

2021-06-23 Thread Max Reitz
bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy

[PATCH v2 4/6] block/file-posix: Do not force-cap *pnum

2021-06-23 Thread Max Reitz
bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy

[PATCH v2 3/6] block: Clarify that @bytes is no limit on *pnum

2021-06-23 Thread Max Reitz
-status cache will become more effective. So, make a note in block_int.h that @bytes is no upper limit for *pnum. Suggested-by: Eric Blake Signed-off-by: Max Reitz --- include/block/block_int.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/block/block_int.h b/include/block

[PATCH v2 1/6] block: Drop BDS comment regarding bdrv_append()

2021-06-23 Thread Max Reitz
ago). So no such care is necessary anymore. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- include/block/block_int.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h index 057d88b1fc..

[PATCH v2 5/6] block/gluster: Do not force-cap *pnum

2021-06-23 Thread Max Reitz
bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy

[PATCH v2 2/6] block: block-status cache for data regions

2021-06-23 Thread Max Reitz
image.) We only use the cache for nodes without children (i.e. protocol nodes), because that is where the problem is: Drivers that rely on block-status implementations outside of qemu (e.g. SEEK_DATA/HOLE). Resolves: https://gitlab.com/qemu-project/qemu/-/issues/307 Signed-off-by: Max Reitz --- inclu

[PATCH v2 0/6] block: block-status cache for data regions

2021-06-23 Thread Max Reitz
4/6:[] [--] 'block/file-posix: Do not force-cap *pnum' 005/6:[] [--] 'block/gluster: Do not force-cap *pnum' 006/6:[] [--] 'block/iscsi: Do not force-cap *pnum' Max Reitz (6): block: Drop BDS comment regarding bdrv_append() block: block-status cache for data regions block: Clar

Re: Running iotest linters from check-python-* CI jobs

2021-06-22 Thread Max Reitz
On 22.06.21 16:57, John Snow wrote: Hi Kevin: At one point I had the idea to augment the Python linter CI jobs to also run the iotest linters. I thought it would be convenient to ensure that while I changed around the QMP and Machine packages that I didn't introduce regressions in iotest 297

Re: [PATCH 4/4] iotests/308: Test allow-other

2021-06-22 Thread Max Reitz
On 22.06.21 17:08, Kevin Wolf wrote: Am 14.06.2021 um 16:44 hat Max Reitz geschrieben: We cannot reasonably test the main point of allow-other, which is to allow users other than the current one to access the FUSE export, because that would require access to sudo, which this test most likely

Re: [PATCH 3/4] export/fuse: Let permissions be adjustable

2021-06-22 Thread Max Reitz
On 22.06.21 17:02, Kevin Wolf wrote: Am 14.06.2021 um 16:44 hat Max Reitz geschrieben: Allow changing the file mode, UID, and GID through SETATTR. This only really makes sense with allow-other, though (because without it, the effective access mode is fixed to be 0600 (u+rw) with qemu's user

[PATCH] block: BDRV_O_NO_IO for backing file on creation

2021-06-22 Thread Max Reitz
here. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/441 Signed-off-by: Max Reitz --- block.c| 6 +- tests/qemu-iotests/189 | 2 +- tests/qemu-iotests/198 | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index 3f456892d0..b459502632

Re: [PATCH 0/4] export/fuse: Allow other users access to the export

2021-06-21 Thread Max Reitz
On 21.06.21 18:12, Kevin Wolf wrote: Am 14.06.2021 um 16:44 hat Max Reitz geschrieben: Hi, With the default mount options, FUSE mounts are not accessible to any users but the one who did the mount, not even to root. To allow such accesses, allow_other must be passed. This is probably useful

Re: [PATCH 2/6] block: block-status cache for data regions

2021-06-21 Thread Max Reitz
On 19.06.21 12:20, Vladimir Sementsov-Ogievskiy wrote: 17.06.2021 18:52, Max Reitz wrote: As we have attempted before (https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg06451.html, "file-posix: Cache lseek result for data regions"; https://lists.nongnu.org/archive/html/qemu-blo

Re: [PATCH 5/6] block/nbd: Do not force-cap *pnum

2021-06-21 Thread Max Reitz
On 19.06.21 12:53, Vladimir Sementsov-Ogievskiy wrote: 17.06.2021 18:52, Max Reitz wrote: bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed

Re: [PATCH 4/6] block/gluster: Do not force-cap *pnum

2021-06-21 Thread Max Reitz
On 19.06.21 12:36, Vladimir Sementsov-Ogievskiy wrote: 17.06.2021 18:52, Max Reitz wrote: bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed

Re: [PATCH 3/6] block/file-posix: Do not force-cap *pnum

2021-06-21 Thread Max Reitz
On 18.06.21 22:16, Eric Blake wrote: On Thu, Jun 17, 2021 at 05:52:44PM +0200, Max Reitz wrote: bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. We

Re: [PATCH 2/6] block: block-status cache for data regions

2021-06-21 Thread Max Reitz
On 18.06.21 20:51, Eric Blake wrote: On Thu, Jun 17, 2021 at 05:52:43PM +0200, Max Reitz wrote: To address this, we want to cache data regions. Most of the time, when bad performance is reported, it is in places where the image is iterated over from start to end (qemu-img convert or the mirror

[PATCH 6/6] block/iscsi: Do not force-cap *pnum

2021-06-17 Thread Max Reitz
bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed-off-by: Max Reitz --- block/iscsi.c | 3 --- 1 file changed, 3 deletions(-) diff --git

[PATCH 4/6] block/gluster: Do not force-cap *pnum

2021-06-17 Thread Max Reitz
bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed-off-by: Max Reitz --- block/gluster.c | 7 --- 1 file changed, 4 insertions(+), 3

[PATCH 2/6] block: block-status cache for data regions

2021-06-17 Thread Max Reitz
image.) We only use the cache for nodes without children (i.e. protocol nodes), because that is where the problem is: Drivers that rely on block-status implementations outside of qemu (e.g. SEEK_DATA/HOLE). Resolves: https://gitlab.com/qemu-project/qemu/-/issues/307 Signed-off-by: Max Reitz --- inclu

[PATCH 5/6] block/nbd: Do not force-cap *pnum

2021-06-17 Thread Max Reitz
bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed-off-by: Max Reitz --- block/nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 3/6] block/file-posix: Do not force-cap *pnum

2021-06-17 Thread Max Reitz
bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed-off-by: Max Reitz --- block/file-posix.c | 7 --- 1 file changed, 4 insertions(+), 3

[PATCH 0/6] block: block-status cache for data regions

2021-06-17 Thread Max Reitz
ock_status(), so our cache can be more effective. Max Reitz (6): block: Drop BDS comment regarding bdrv_append() block: block-status cache for data regions block/file-posix: Do not force-cap *pnum block/gluster: Do not force-cap *pnum block/nbd: Do not force-cap *pnum block/iscsi: Do

[PATCH 1/6] block: Drop BDS comment regarding bdrv_append()

2021-06-17 Thread Max Reitz
ago). So no such care is necessary anymore. Signed-off-by: Max Reitz --- include/block/block_int.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h index 057d88b1fc..a8f9598102 100644 --- a/include/block/block_int.h +++ b/include/block/b

Re: [PATCH v3 3/7] block: add max_hw_transfer to BlockLimits

2021-06-16 Thread Max Reitz
On 16.06.21 15:18, Paolo Bonzini wrote: On 15/06/21 18:18, Max Reitz wrote:   } +/* Returns the maximum hardware transfer length, in bytes; guaranteed nonzero */ +uint64_t blk_get_max_hw_transfer(BlockBackend *blk) +{ +    BlockDriverState *bs = blk_bs(blk); +    uint64_t max = INT_MAX

Re: [PATCH v3 7/7] block: detect DKIOCGETBLOCKCOUNT/SIZE before use

2021-06-15 Thread Max Reitz
On 03.06.21 15:37, Paolo Bonzini wrote: From: Joelle van Dyne iOS hosts do not have these defined so we fallback to the default behaviour. Co-authored-by: Warner Losh Reviewed-by: Peter Maydell Signed-off-by: Joelle van Dyne Message-Id: <20210315180341.31638-...@getutm.app> Signed-off-by:

Re: [PATCH v3 6/7] block: check for sys/disk.h

2021-06-15 Thread Max Reitz
onzini --- block.c | 2 +- meson.build | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz

Re: [PATCH v3 5/7] block: feature detection for host block support

2021-06-15 Thread Max Reitz
On 03.06.21 15:37, Paolo Bonzini wrote: From: Joelle van Dyne On Darwin (iOS), there are no system level APIs for directly accessing host block devices. We detect this at configure time. Signed-off-by: Joelle van Dyne Message-Id: <20210315180341.31638-...@getutm.app> Signed-off-by: Paolo

Re: [PATCH v3 4/7] file-posix: try BLKSECTGET on block devices too, do not round to power of 2

2021-06-15 Thread Max Reitz
On 03.06.21 15:37, Paolo Bonzini wrote: bs->sg is only true for character devices, but block devices can also be used with scsi-block and scsi-generic. Unfortunately BLKSECTGET returns bytes in an int for /dev/sgN devices, and sectors in a short for block devices, so account for that in the

Re: [PATCH v3 3/7] block: add max_hw_transfer to BlockLimits

2021-06-15 Thread Max Reitz
On 03.06.21 15:37, Paolo Bonzini wrote: For block host devices, I/O can happen through either the kernel file descriptor I/O system calls (preadv/pwritev, io_submit, io_uring) or the SCSI passthrough ioctl SG_IO. In the latter case, the size of each transfer can be limited by the HBA, while for

Re: [PATCH v3 2/7] scsi-generic: pass max_segments via max_iov field in BlockLimits

2021-06-15 Thread Max Reitz
On 03.06.21 15:37, Paolo Bonzini wrote: I/O to a disk via read/write is not limited by the number of segments allowed by the host adapter; the kernel can split requests if needed, and the limit imposed by the host adapter can be very low (256k or so) to avoid that SG_IO returns EINVAL if memory

Re: [PATCH v3 2/7] scsi-generic: pass max_segments via max_iov field in BlockLimits

2021-06-15 Thread Max Reitz
-generic.c | 6 -- 2 files changed, 5 insertions(+), 4 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v3 1/7] file-posix: fix max_iov for /dev/sg devices

2021-06-15 Thread Max Reitz
-ENOTSUP; +} + With %s/->/./: Reviewed-by: Max Reitz (To answer Vladimir’s question, I don’t believe the condition should be bs->sg, because bs->sg == true is a given for this function anyway. Therefore, there’s no need to check whether the char device is an SG device.)

[PATCH 4/4] iotests/308: Test allow-other

2021-06-14 Thread Max Reitz
default_permissions). Signed-off-by: Max Reitz --- tests/qemu-iotests/308 | 91 ++ tests/qemu-iotests/308.out | 47 2 files changed, 138 insertions(+) diff --git a/tests/qemu-iotests/308 b/tests/qemu-iotests/308 index f122065d0f

[PATCH 1/4] export/fuse: Add allow-other option

2021-06-14 Thread Max Reitz
code performs no permission checks. With default_permissions, we can just let the kernel do it. Signed-off-by: Max Reitz --- qapi/block-export.json | 11 ++- block/export/fuse.c| 17 +++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/qapi/block

[PATCH 2/4] export/fuse: Give SET_ATTR_SIZE its own branch

2021-06-14 Thread Max Reitz
In order to support changing other attributes than the file size in fuse_setattr(), we have to give each its own independent branch. This also applies to the only attribute we do support right now. Signed-off-by: Max Reitz --- block/export/fuse.c | 20 +++- 1 file changed, 11

[PATCH 3/4] export/fuse: Let permissions be adjustable

2021-06-14 Thread Max Reitz
. Signed-off-by: Max Reitz --- block/export/fuse.c | 48 ++--- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/block/export/fuse.c b/block/export/fuse.c index 1d54286d90..742e0af657 100644 --- a/block/export/fuse.c +++ b/block/export/fuse.c

[PATCH 0/4] export/fuse: Allow other users access to the export

2021-06-14 Thread Max Reitz
allowing other users access to the export.) This also requires our SETATTR code to be able to handle permission changes, though, so the user can then run chmod/chown/chgrp on the export to adjust its permissions to their need. The final patch adds a test. Max Reitz (4): export/fuse: Add allow

Re: [PATCH] block/snapshot: Clarify goto fallback behavior

2021-06-04 Thread Max Reitz
On 03.06.21 18:02, Peter Maydell wrote: On Mon, 3 May 2021 at 10:55, Max Reitz wrote: In the bdrv_snapshot_goto() fallback code, we work with a pointer to either bs->file or bs->backing. We close that child, close the node (with .bdrv_close()), apply the snapshot on the chil

Re: [PATCH v2 33/33] iotests/image-fleecing: add test-case for copy-before-write filter

2021-06-01 Thread Max Reitz
without ** now. With them dropped: Reviewed-by: Max Reitz +'driver': 'copy-before-write', +'node-name': 'fl-cbw', +'file': src_node, +'target': tmp_node +})) + +log(vm.qmp('qom-set', path=qom_path, property='drive', value='fl-cbw

Re: [PATCH v2 32/33] iotests/image-fleecing: prepare for adding new test-case

2021-06-01 Thread Max Reitz
changed, 13 insertions(+), 6 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v2 31/33] iotests/image-fleecing: rename tgt_node

2021-06-01 Thread Max Reitz
ecing | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v2 30/33] iotests/image-fleecing: proper source device

2021-06-01 Thread Max Reitz
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/image-fleecing | 12 tests/qemu-iotests/tests/image-fleecing.out | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v2 28/33] iotests: move 222 to tests/image-fleecing

2021-06-01 Thread Max Reitz
rtions(+), 0 deletions(-) rename tests/qemu-iotests/{222 => tests/image-fleecing} (100%) rename tests/qemu-iotests/{222.out => tests/image-fleecing.out} (100%) Reviewed-by: Max Reitz

Re: [PATCH v2 29/33] iotests.py: hmp_qemu_io: support qdev

2021-06-01 Thread Max Reitz
On 20.05.21 16:22, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v2 27/33] iotests/222: constantly use single quotes for strings

2021-06-01 Thread Max Reitz
deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v2 26/33] iotests/222: fix pylint and mypy complains

2021-06-01 Thread Max Reitz
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/222 | 20 +++- tests/qemu-iotests/297 | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v2 25/33] iotests.py: VM: add own __enter__ method

2021-06-01 Thread Max Reitz
-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 4 1 file changed, 4 insertions(+) Reviewed-by: Max Reitz

Re: [PATCH v2 24/33] python/qemu/machine: QEMUMachine: improve qmp() method

2021-06-01 Thread Max Reitz
-Ogievskiy --- python/qemu/machine.py | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz

Re: [PATCH v2 23/33] python/qemu/machine.py: refactor _qemu_args()

2021-06-01 Thread Max Reitz
-- 1 file changed, 8 insertions(+), 10 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v2 22/33] qapi: publish copy-before-write filter

2021-06-01 Thread Max Reitz
blocks +# from its file child and copies them to @target child. After successful +# copying the write request is propagated to file child. If copying +# filed, the original write request is failed too and no data is written s/filed/failed/ With that fixed: Reviewed-by: Max Reitz +# to file child

Re: [PATCH v2 00/33] block: publish backup-top filter

2021-05-31 Thread Max Reitz
On 20.05.21 16:21, Vladimir Sementsov-Ogievskiy wrote: Hi all! v2: 01-02: new 03: don't bother with supporting empty child: we should never have such at this point 05: add comment 06: keep checking conflict with global add realized_set_allowed to qdev_prop_drive_iothread 07: improve

Re: [PATCH v2 19/33] block/copy-before-write: initialize block-copy bitmap

2021-05-31 Thread Max Reitz
-before-write filter, and then backup modifies it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c| 16 +++- block/copy-before-write.c | 4 2 files changed, 11 insertions(+), 9 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v2 18/33] block/copy-before-write: cbw_init(): use options

2021-05-31 Thread Max Reitz
+-- 1 file changed, 26 insertions(+), 14 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v2 15/33] block/copy-before-write: introduce cbw_init()

2021-05-31 Thread Max Reitz
a function which will be turned into .bdrv_open() handler in future commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/copy-before-write.c | 69 +++ 1 file changed, 41 insertions(+), 28 deletions(-)

Re: [PATCH v2 14/33] block/copy-before-write: bdrv_cbw_append(): replace child at last

2021-05-31 Thread Max Reitz
. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/copy-before-write.c | 33 +++-- 1 file changed, 11 insertions(+), 22 deletions(-)

Re: [PATCH v2 13/33] block/copy-before-write: use file child instead of backing

2021-05-31 Thread Max Reitz
--- block/copy-before-write.c | 39 ++- 1 file changed, 22 insertions(+), 17 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v2 12/33] block/copy-before-write: drop extra bdrv_unref on failure path

2021-05-31 Thread Max Reitz
On 20.05.21 16:21, Vladimir Sementsov-Ogievskiy wrote: bdrv_attach_child() do bdrv_unref() on failure, so we shouldn't do it by hand here. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/copy-before-write.c | 1 - 1 file changed, 1 deletion(-) Reviewed-by: Max Reitz

Re: [PATCH v2 07/33] block: rename backup-top to copy-before-write

2021-05-31 Thread Max Reitz
otests/283 | 35 +++ tests/qemu-iotests/283.out | 4 +- 7 files changed, 95 insertions(+), 100 deletions(-) rename block/{backup-top.h => copy-before-write.h} (56%) rename block/{backup-top.c => copy-before-write.c} (62%) Reviewed-by: Max Reitz

Re: [PATCH v2 06/33] qdev: allow setting drive property for realized device

2021-05-31 Thread Max Reitz
+++- 1 file changed, 31 insertions(+), 12 deletions(-) Tentative Reviewed-by: Max Reitz

Re: [PATCH v2 05/33] qdev-properties: PropertyInfo: add realized_set_allowed field

2021-05-31 Thread Max Reitz
-properties.c| 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v2 03/33] block: introduce bdrv_replace_child_bs()

2021-05-31 Thread Max Reitz
(+) Reviewed-by: Max Reitz

Re: [RFC PATCH] block/vpc: Support probing of fixed-size VHD images

2021-05-31 Thread Max Reitz
On 19.05.21 12:19, Thomas Huth wrote: On 29/03/2021 09.25, Thomas Huth wrote: Fixed-size VHD images don't have a header, only a footer. To be able to still detect them right, support probing via the file name, too. Without this change, images get detected as raw: $ qemu-img create -f vpc -o

Re: [PATCH v2 02/33] block: comment graph-modifying function not updating permissions

2021-05-31 Thread Max Reitz
On 20.05.21 16:21, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 7 +++ 1 file changed, 7 insertions(+) Reviewed-by: Max Reitz

Re: [PATCH v2 01/33] block: rename bdrv_replace_child to bdrv_replace_child_tran

2021-05-31 Thread Max Reitz
rename and add comment. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) Reviewed-by: Max Reitz

Re: RFC: Qemu backup interface plans

2021-05-25 Thread Max Reitz
On 19.05.21 08:11, Vladimir Sementsov-Ogievskiy wrote: 18.05.2021 19:39, Max Reitz wrote: [...] On 17.05.21 14:07, Vladimir Sementsov-Ogievskiy wrote: [...] Not also, that there is another benefit of such thing: we'll implement this callback in qcow2 driver, so that backup will read

Re: [PULL 03/19] monitor: hmp_qemu_io: acquire aio contex, fix crash

2021-05-20 Thread Max Reitz
On 20.05.21 15:44, Peter Maydell wrote: On Fri, 14 May 2021 at 17:45, Max Reitz wrote: From: Vladimir Sementsov-Ogievskiy Hi; Coverity complains about this code (CID 1453194): diff --git a/qemu-io.c b/qemu-io.c index bf902302e9..57f07501df 100644 --- a/qemu-io.c +++ b/qemu-io.c @@ -411,6

Re: [PATCH 01/21] block: introduce bdrv_replace_child_bs()

2021-05-19 Thread Max Reitz
On 19.05.21 12:12, Vladimir Sementsov-Ogievskiy wrote: 17.05.2021 15:09, Max Reitz wrote: On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: Add function to transactionally replace bs inside BdrvChild. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   include/block/block.h |  2

Re: Qemu block filter insertion/removal API

2021-05-18 Thread Max Reitz
On 17.05.21 14:44, Vladimir Sementsov-Ogievskiy wrote: Hi all! I'd like to be sure that we know where we are going to. In blockdev-era where qemu user is aware about block nodes, all nodes have good names and controlled by user we can efficiently use block filters. We already have some

Re: RFC: Qemu backup interface plans

2021-05-18 Thread Max Reitz
Hi, Your proposal sounds good to me in general. Some small independent building blocks that seems to make sense to me. On 17.05.21 14:07, Vladimir Sementsov-Ogievskiy wrote: [...] What we lack in this scheme: 1. handling dirty bitmap in backup-top filter: backup-top does

Re: [PATCH 21/21] itotests/222: add test-case for copy-before-write filter

2021-05-18 Thread Max Reitz
On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: New fleecing method becomes available: copy-before-write filter. Actually we don't need backup job to setup image fleecing. Add test fore new recommended way of image fleecing. *for Signed-off-by: Vladimir Sementsov-Ogievskiy ---

Re: [PATCH 20/21] qapi: publish copy-before-write filter

2021-05-18 Thread Max Reitz
On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 2ea294129e..f8fbcb6416

Re: [PATCH 19/21] block/copy-before-write: make public block driver

2021-05-18 Thread Max Reitz
ere Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/copy-before-write.c | 60 ++- 1 file changed, 28 insertions(+), 32 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH 16/21] block/copy-before-write: cbw_init(): use options

2021-05-18 Thread Max Reitz
On 18.05.21 16:24, Vladimir Sementsov-Ogievskiy wrote: 18.05.2021 16:56, Max Reitz wrote: On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: One more step closer to .bdrv_open(): use options instead of plain arguments. Move to bdrv_open_child() calls, native for drive open handlers

Re: [PATCH 18/21] block/block-copy: make setting progress optional

2021-05-18 Thread Max Reitz
it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/block-copy.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) Makes me wonder whether an “if (not NULL)” check in progress_meter.h wouldn’t be a nice addition, but: Reviewed-by: Max Reitz

Re: [PATCH 17/21] block/block-copy: switch to fully set bitmap by default

2021-05-18 Thread Max Reitz
job. That’s a valid reason, though, so: Reviewed-by: Max Reitz Still, I find it stranger this way, because I’m more used to “initialization to 0 by default”. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 16 +++- block/block-copy.c | 1 + 2 files

Re: [PATCH 16/21] block/copy-before-write: cbw_init(): use options

2021-05-18 Thread Max Reitz
On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: One more step closer to .bdrv_open(): use options instead of plain arguments. Move to bdrv_open_child() calls, native for drive open handlers. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/copy-before-write.c | 37

Re: [PATCH 15/21] block/copy-before-write: cbw_init(): use file child after attaching

2021-05-18 Thread Max Reitz
ed-off-by: Vladimir Sementsov-Ogievskiy --- block/copy-before-write.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH 14/21] block/copy-before-write: cbw_init(): rename variables

2021-05-18 Thread Max Reitz
, 14 insertions(+), 15 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH 13/21] block/copy-before-write: introduce cbw_init()

2021-05-18 Thread Max Reitz
() handler in future commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/copy-before-write.c | 73 +++ 1 file changed, 43 insertions(+), 30 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH 12/21] block/copy-before-write: bdrv_cbw_append(): replace child at last

2021-05-18 Thread Max Reitz
-by: Vladimir Sementsov-Ogievskiy --- block/copy-before-write.c | 33 +++-- 1 file changed, 11 insertions(+), 22 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH 11/21] block/copy-before-write: use file child instead of backing

2021-05-18 Thread Max Reitz
On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: We are going to publish copy-before-write filter, and there no public backing-child-based filter in Qemu. No reason to create a precedent, so let's refactor copy-before-write filter instead. Signed-off-by: Vladimir Sementsov-Ogievskiy ---

Re: [PATCH 10/21] block/copy-before-write: relax permission requirements when no parents

2021-05-18 Thread Max Reitz
express this through permissions alone. I guess we could check “perm & BLK_PERM_CONSISTENT_READ”, but that would actually be just a crutch to see whether there are any parents. I suppose this really is about whether there are parents or not. So: Reviewed-by: Max Reitz +

Re: [PATCH 05/21] block: rename backup-top to copy-before-write

2021-05-18 Thread Max Reitz
On 17.05.21 21:42, Vladimir Sementsov-Ogievskiy wrote: 17.05.2021 19:05, Max Reitz wrote: On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: We are going to convert backup_top to full featured public filter, which can be used in separate of backup job. Start from renaming from "how it

Re: [PATCH 04/21] qdev: allow setting drive property for realized device

2021-05-18 Thread Max Reitz
On 17.05.21 20:09, Vladimir Sementsov-Ogievskiy wrote: 17.05.2021 18:48, Max Reitz wrote: On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: We need an ability to insert filters above top block node, attached to block device. It can't be achieved with blockdev-reopen command. So, we want

Re: [PATCH 09/21] block/backup: move cluster size calculation to block-copy

2021-05-17 Thread Max Reitz
| 58 ++ block/block-copy.c | 47 +- block/copy-before-write.c | 10 +++ 5 files changed, 62 insertions(+), 59 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH 08/21] block/backup: stricter backup_calculate_cluster_size()

2021-05-17 Thread Max Reitz
On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: No reason to tolerate bdrv_get_info() errors except for ENOTSUP. Let's just error-out, it's simpler and safer. Hm, doesn’t look that much simpler to me. Not sure how much safer it is, because the point was that in the target_does_cow

Re: [PATCH 07/21] block-copy: always set BDRV_REQ_SERIALISING flag

2021-05-17 Thread Max Reitz
(-) Reviewed-by: Max Reitz

Re: [PATCH 06/21] block/backup: drop support for copy_range

2021-05-17 Thread Max Reitz
insertions(+), 6 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH 05/21] block: rename backup-top to copy-before-write

2021-05-17 Thread Max Reitz
On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: We are going to convert backup_top to full featured public filter, which can be used in separate of backup job. Start from renaming from "how it used" to "what it does". Is this safe? The name was externally visible in queries after all.

Re: [PATCH 01/21] block: introduce bdrv_replace_child_bs()

2021-05-17 Thread Max Reitz
On 17.05.21 16:30, Vladimir Sementsov-Ogievskiy wrote: 17.05.2021 15:09, Max Reitz wrote: On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: Add function to transactionally replace bs inside BdrvChild. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   include/block/block.h |  2

Re: [PATCH 04/21] qdev: allow setting drive property for realized device

2021-05-17 Thread Max Reitz
On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: We need an ability to insert filters above top block node, attached to block device. It can't be achieved with blockdev-reopen command. So, we want do it with help of qom-set. Intended usage: 1. blockdev-add, creating the filter, which

Re: [PATCH 03/21] qdev-properties: PropertyInfo: add realized_set_allowed field

2021-05-17 Thread Max Reitz
On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: Add field, so property can declare support for setting the property when device is realized. To be used in the following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/hw/qdev-properties.h | 1 +

Re: [PATCH 02/21] block: introduce blk_replace_bs

2021-05-17 Thread Max Reitz
; } +/* + * Change BlockDriverState associated with @blk. + */ +int blk_replace_bs(BlockBackend *blk, BlockDriverState *new_bs, Error **errp) +{ +return bdrv_replace_child_bs(blk->root, new_bs, errp); +} Reviewed-by: Max Reitz (Looks indeed like we don’t need to do any of the thi

Re: [PATCH 01/21] block: introduce bdrv_replace_child_bs()

2021-05-17 Thread Max Reitz
On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: Add function to transactionally replace bs inside BdrvChild. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block.h | 2 ++ block.c | 36 2 files changed, 38

<    1   2   3   4   5   6   7   8   9   10   >