multiple connections per block device with NBD?

2022-02-01 Thread Sam
Hello, I am wondering whether NBD integration of qemu is able to establish multiple connections to remote NBD server for a single block device. nbd-client has this option: -C, --connections Use num connections to the server, to allow speeding up request handling, at the cost of higher

Re: [PATCH v4 4/4] python/aqmp: add socket bind step to legacy.py

2022-02-01 Thread Kevin Wolf
Am 01.02.2022 um 19:32 hat John Snow geschrieben: > On Tue, Feb 1, 2022 at 8:21 AM Kevin Wolf wrote: > > > > Am 01.02.2022 um 05:11 hat John Snow geschrieben: > > > The synchronous QMP library would bind to the server address during > > > __init__(). The new library delays this to the accept()

Re: [PATCH v2 15/25] block: fix FreeBSD build failure with fallocate

2022-02-01 Thread Kevin Wolf
Am 01.02.2022 um 19:20 hat Alex Bennée geschrieben: > We already use the CONFIG_FALLOCATE_PUNCH_HOLE symbol elsewhere in the > code so use it here. > > Fixes: 4ca37a96a7 ("fuse: (Partially) implement fallocate()") > Cc: Hanna Reitz > Signed-off-by: Alex Bennée I think this addresses the same

Re: [PULL 00/24] Block patches

2022-02-01 Thread Peter Maydell
On Tue, 1 Feb 2022 at 14:42, Hanna Reitz wrote: > > The following changes since commit 804b30d25f8d70dc2dea951883ea92235274a50c: > > Merge remote-tracking branch 'remotes/legoater/tags/pull-ppc-20220130' into > staging (2022-01-31 11:10:08 +) > > are available in the Git repository at: > >

Re: [PATCH v4 1/4] python/aqmp: Fix negotiation with pre-"oob" QEMU

2022-02-01 Thread John Snow
On Tue, Feb 1, 2022 at 7:59 AM Kevin Wolf wrote: > > Am 01.02.2022 um 05:11 hat John Snow geschrieben: > > QEMU versions prior to the "oob" capability *also* can't accept the > > "enable" keyword argument at all. Fix the handshake process with older > > QEMU versions. > > > > Signed-off-by: John

[PATCH v2 15/25] block: fix FreeBSD build failure with fallocate

2022-02-01 Thread Alex Bennée
We already use the CONFIG_FALLOCATE_PUNCH_HOLE symbol elsewhere in the code so use it here. Fixes: 4ca37a96a7 ("fuse: (Partially) implement fallocate()") Cc: Hanna Reitz Signed-off-by: Alex Bennée --- block/export/fuse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/export/fuse.c

Re: [PATCH v4 0/4] Python: Improvements for iotest 040,041

2022-02-01 Thread John Snow
On Tue, Feb 1, 2022 at 8:28 AM Kevin Wolf wrote: > > Am 01.02.2022 um 05:11 hat John Snow geschrieben: > > GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-aqmp-fixes > > CI: https://gitlab.com/jsnow/qemu/-/pipelines/455146881 > > > > Fixes and improvements all relating to "iotest 040,041,

Re: [PATCH v4 4/4] python/aqmp: add socket bind step to legacy.py

2022-02-01 Thread John Snow
On Tue, Feb 1, 2022 at 8:21 AM Kevin Wolf wrote: > > Am 01.02.2022 um 05:11 hat John Snow geschrieben: > > The synchronous QMP library would bind to the server address during > > __init__(). The new library delays this to the accept() call, because > > binding occurs inside of the call to

[PATCH v2 08/25] drop libxml2 checks since libxml is not actually used (for parallels)

2022-02-01 Thread Alex Bennée
From: Michael Tokarev For a long time, we assumed that libxml2 is necessary for parallels block format support (block/parallels*). However, this format actually does not use libxml [*]. Since this is the only user of libxml2 in whole QEMU tree, we can drop all libxml2 checks and dependencies

Re: [PATCH v8 1/5] QIOChannel: Add flags on io_writev and introduce io_flush callback

2022-02-01 Thread Leonardo Bras Soares Passos
Hello Daniel, thanks for reviewing! On Tue, Feb 1, 2022 at 6:35 AM Daniel P. Berrangé wrote: > > On Tue, Feb 01, 2022 at 03:28:59AM -0300, Leonardo Bras wrote: > > Add flags to io_writev and introduce io_flush as optional callback to > > QIOChannelClass, allowing the implementation of zero copy

Re: [RFC] block/nbd: Move s->ioc on AioContext change

2022-02-01 Thread Vladimir Sementsov-Ogievskiy
01.02.2022 19:14, Hanna Reitz wrote: reconnect_delay_timer should exist only during IO request: it's created during request if we don't have a connection. And request will not finish until timer elapsed or connection established (timer should be removed in this case too). So, again, when

Re: [RFC] block/nbd: Move s->ioc on AioContext change

2022-02-01 Thread Hanna Reitz
On 01.02.22 12:40, Hanna Reitz wrote: On 01.02.22 12:18, Vladimir Sementsov-Ogievskiy wrote: 28.01.2022 18:51, Hanna Reitz wrote: s->ioc must always be attached to the NBD node's AioContext.  If that context changes, s->ioc must be attached to the new context. Buglink:

[PULL 10/10] block/rbd: workaround for ceph issue #53784

2022-02-01 Thread Kevin Wolf
From: Peter Lieven 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 around this bug for pre Quincy versions of

[PULL 09/10] block/rbd: fix handling of holes in .bdrv_co_block_status

2022-02-01 Thread Kevin Wolf
From: Peter Lieven the assumption that we can't hit a hole if we do not diff against a snapshot was wrong. We can see a hole in an image if we diff against base if there exists an older snapshot of the image and we have discarded blocks in the image where the snapshot has data. Fix this by

[PULL 08/10] qemu-img: Unify [-b [-F]] documentation

2022-02-01 Thread Kevin Wolf
From: Hanna Reitz qemu-img convert documents the backing file and backing format options as follows: [-B backing_file [-F backing_fmt]] whereas qemu-img create has this: [-b backing_file] [-F backing_fmt] That is, for convert, we document that -F cannot be given without -B, while for

Re: [PATCH v4 0/4] Python: Improvements for iotest 040,041

2022-02-01 Thread Kevin Wolf
Am 01.02.2022 um 05:11 hat John Snow geschrieben: > GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-aqmp-fixes > CI: https://gitlab.com/jsnow/qemu/-/pipelines/455146881 > > Fixes and improvements all relating to "iotest 040,041, intermittent > failure in netbsd VM" >

Re: [PATCH v4 4/4] python/aqmp: add socket bind step to legacy.py

2022-02-01 Thread Kevin Wolf
Am 01.02.2022 um 05:11 hat John Snow geschrieben: > The synchronous QMP library would bind to the server address during > __init__(). The new library delays this to the accept() call, because > binding occurs inside of the call to start_[unix_]server(), which is an > async method -- so it cannot

[PULL 03/10] block/export: Fix vhost-user-blk shutdown with requests in flight

2022-02-01 Thread Kevin Wolf
The vhost-user-blk export runs requests asynchronously in their own coroutine. When the vhost connection goes away and we want to stop the vhost-user server, we need to wait for these coroutines to stop before we can unmap the shared memory. Otherwise, they would still access the unmapped memory

Re: Block alignment of qcow2 compress driver

2022-02-01 Thread Vladimir Sementsov-Ogievskiy
28.01.2022 14:07, Richard W.M. Jones wrote: The commands below set up a sparse RAM disk, with an allocated block at offset 32K and another one at offset 1M-32K. Then it tries to copy this to a compressed qcow2 file using qemu-nbd + the qemu compress filter: $ qemu-img create -f qcow2

[PULL 04/10] block/export/fuse: Rearrange if-else-if ladder in fuse_fallocate()

2022-02-01 Thread Kevin Wolf
From: Philippe Mathieu-Daudé In order to safely maintain a mixture of #ifdef'ry with if-else-if ladder, rearrange the last statement (!mode) first. Since it is mutually exclusive with the other conditions, checking it first doesn't make any logical difference, but allows to add #ifdef'ry around

iotests failure on netbsd VM, no useful errors logged

2022-02-01 Thread Peter Maydell
Hi; I see an iotests error running 'make vm-build-netbsd' (ie running a build and make check on a NetBSD VM), but there is no indication of what's actually failing. Same thing seems to happen on OpenBSD too. Full logfile at https://people.linaro.org/~peter.maydell/netbsd-log.txt ; here's the

[PULL 01/24] tests/qemu-iotests: Fix 051 for binaries without 'lsi53c895a'

2022-02-01 Thread Hanna Reitz
From: Thomas Huth The lsi53c895a SCSI adaptor might not be enabled in each and every x86 QEMU binary, e.g. it's disabled in the RHEL/CentOS build. Thus let's add a check to the 051 test so that it does not fail if this device is not available. Signed-off-by: Thomas Huth Message-Id:

[PULL 06/10] block.h: remove outdated comment

2022-02-01 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito The comment "disk I/O throttling" doesn't make any sense at all any more. It was added in commit 0563e191516 to describe bdrv_io_limits_enable()/disable(), which were removed in commit 97148076, so the comment is just a forgotten leftover. Suggested-by: Kevin

[PULL 00/10] Block layer patches

2022-02-01 Thread Kevin Wolf
The following changes since commit 804b30d25f8d70dc2dea951883ea92235274a50c: Merge remote-tracking branch 'remotes/legoater/tags/pull-ppc-20220130' into staging (2022-01-31 11:10:08 +) are available in the Git repository at: https://gitlab.com/kmwolf/qemu.git tags/for-upstream for you

[PULL 05/10] block/export/fuse: Fix build failure on FreeBSD

2022-02-01 Thread Kevin Wolf
From: Philippe Mathieu-Daudé When building on FreeBSD we get: [816/6851] Compiling C object libblockdev.fa.p/block_export_fuse.c.o ../block/export/fuse.c:628:16: error: use of undeclared identifier 'FALLOC_FL_KEEP_SIZE' if (mode & FALLOC_FL_KEEP_SIZE) { ^

[PULL 07/10] qsd: Document fuse's allow-other option

2022-02-01 Thread Kevin Wolf
From: Hanna Reitz We did not add documentation to the storage daemon's man page for fuse's allow-other option when it was introduced, so do that now. Fixes: 8fc54f9428b9763f800 ("export/fuse: Add allow-other option") Signed-off-by: Hanna Reitz Message-Id:

[PULL 01/10] qemu-storage-daemon: Fix typo in vhost-user-blk help

2022-02-01 Thread Kevin Wolf
The syntax of the fd passing case misses the "addr.type=" key. Add it. Signed-off-by: Kevin Wolf Message-Id: <20220125151514.49035-1-kw...@redhat.com> Reviewed-by: Hanna Reitz Signed-off-by: Kevin Wolf --- storage-daemon/qemu-storage-daemon.c | 2 +- 1 file changed, 1 insertion(+), 1

[PULL 02/10] block: bdrv_set_backing_hd(): use drained section

2022-02-01 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Graph modifications should be done in drained section. stream_prepare() handler of block stream job call bdrv_set_backing_hd() without using drained section and it's theoretically possible that some IO request will interleave with graph modification and will

[PULL 22/24] block-backend: Retain permissions after migration

2022-02-01 Thread Hanna Reitz
After migration, the permissions the guest device wants to impose on its BlockBackend are stored in blk->perm and blk->shared_perm. In blk_root_activate(), we take our permissions, but keep all shared permissions open by calling `blk_set_perm(blk->perm, BLK_PERM_ALL)`. Only afterwards

[PULL 09/24] iotest 303: explicit compression type

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy The test prints qcow2 header fields which depends on chosen compression type. So, let's be explicit in what compression type we want and independent of IMGOPTS. Test both existing compression types. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max

[PULL 17/24] iotest 39: use _qcow2_dump_header

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy _qcow2_dump_header has filter for compression type, so this change makes test pass with IMGOPTS='compression_type=zstd'. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20211223160144.1097696-16-vsement...@virtuozzo.com>

[PULL 20/24] iotest 214: explicit compression type

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy The test-case "Corrupted size field in compressed cluster descriptor" heavily depends on zlib compression type. So, make it explicit. This way test passes with IMGOPTS='compression_type=zstd'. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz

[PULL 02/24] iotests/MRCE: Write data to source

2022-02-01 Thread Hanna Reitz
This test assumes that mirror flushes the source when entering the READY state, and that the format level will pass that flush on to the protocol level (where we intercept it with blkdebug). However, apparently that does not happen when using a VMDK image with zeroed_grain=on, which actually is

Re: [PATCH 00/14] block: cleanup backing and file handling

2022-02-01 Thread Vladimir Sementsov-Ogievskiy
Ping 03.12.2021 23:25, Vladimir Sementsov-Ogievskiy wrote: Hi all! I started this as a follow-up to "block: Attempt on fixing 030-reported errors" by Hanna. In Hanna's series I really like how bs->children handling moved to .attach/.detach handlers. .file and .backing are kind of "shortcuts"

[PULL 03/24] iotests.py: img_info_log(): rename imgopts argument

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy We are going to support IMGOPTS environment variable like in bash tests. Corresponding global variable in iotests.py should be called imgopts. So to not interfere with function argument, rename it in advance. Signed-off-by: Vladimir Sementsov-Ogievskiy

[PULL 10/24] iotest 065: explicit compression type

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy The test checks different options. It of course fails if set IMGOPTS='compression_type=zstd'. So, let's be explicit in what compression type we want and independent of IMGOPTS. Test both existing compression types. Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: [PATCH 10/12] block.c: add subtree_drains where needed

2022-02-01 Thread Vladimir Sementsov-Ogievskiy
18.01.2022 19:27, Emanuele Giuseppe Esposito wrote: Protect bdrv_replace_child_noperm, as it modifies the graph by adding/removing elements to .children and .parents list of a bs. Use the newly introduced bdrv_subtree_drained_{begin/end}_unlocked drains to achieve that and be free from the

[PULL 00/24] Block patches

2022-02-01 Thread Hanna Reitz
The following changes since commit 804b30d25f8d70dc2dea951883ea92235274a50c: Merge remote-tracking branch 'remotes/legoater/tags/pull-ppc-20220130' into staging (2022-01-31 11:10:08 +) are available in the Git repository at: https://gitlab.com/hreitz/qemu.git tags/pull-block-2022-02-01

[PULL 16/24] iotests: massive use _qcow2_dump_header

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy We are going to add filtering in _qcow2_dump_header and want all tests use it. The patch is generated by commands: cd tests/qemu-iotests sed -ie 's/$PYTHON qcow2.py "$TEST_IMG" dump-header\($\| \)/_qcow2_dump_header\1/' ??? tests/* (the difficulty is to

[PULL 19/24] iotests 60: more accurate set dirty bit in qcow2 header

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Don't touch other incompatible bits, like compression-type. This makes the test pass with IMGOPTS='compression_type=zstd'. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20211223160144.1097696-18-vsement...@virtuozzo.com>

[PULL 06/24] iotests.py: qemu_img*("create"): support IMGOPTS='compression_type=zstd'

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Adding support of IMGOPTS (like in bash tests) allows user to pass a lot of different options. Still, some may require additional logic. Now we want compression_type option, so add some smart logic around it: ignore compression_type=zstd in IMGOPTS, if test

[PULL 23/24] iotests/migration-permissions: New test

2022-02-01 Thread Hanna Reitz
This test checks that a raw image in use by a virtio-blk device does not share the WRITE permission both before and after migration. Signed-off-by: Hanna Reitz --- .../qemu-iotests/tests/migration-permissions | 101 ++ .../tests/migration-permissions.out | 5 + 2

[PULL 11/24] iotests.py: filter out successful output of qemu-img create

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy The only "feature" of this "Formatting ..." line is that we have to update it every time we add new option. Let's drop it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Message-Id: <20211223160144.1097696-10-vsement...@virtuozzo.com>

[PULL 14/24] qcow2: simple case support for downgrading of qcow2 images with zstd

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy If image doesn't have any compressed cluster we can easily switch to zlib compression, which may allow to downgrade the image. That's mostly needed to support IMGOPTS='compression_type=zstd' in some iotests which do qcow2 downgrade. While being here also fix

[PULL 15/24] iotests/common.rc: introduce _qcow2_dump_header helper

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy We'll use it in tests instead of explicit qcow2.py. Then we are going to add some filtering in _qcow2_dump_header. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20211223160144.1097696-14-vsement...@virtuozzo.com>

[PULL 05/24] iotests: specify some unsupported_imgopts for python iotests

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy We are going to support IMGOPTS for python iotests. Still some iotests will not work with common IMGOPTS used with bash iotests like specifying refcount_bits and compat qcow2 options. So we should define corresponding unsupported_imgopts for now.

[PULL 13/24] iotest 302: use img_info_log() helper

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Instead of qemu_img_log("info", ..) use generic helper img_info_log(). img_info_log() has smarter logic. For example it use filter_img_info() to filter output, which in turns filter a compression type. So it will help us in future when we implement a

[PULL 21/24] iotests: declare lack of support for compresion_type in IMGOPTS

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy compression_type can't be used if we want to create image with compat=0.10. So, skip these tests, not many of them. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Message-Id: <20211223160144.1097696-20-vsement...@virtuozzo.com>

[PULL 18/24] iotests: bash tests: filter compression type

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy We want iotests pass with both the default zlib compression and with IMGOPTS='compression_type=zstd'. Actually the only test that is interested in real compression type in test output is 287 (test for qcow2 compression type), so implement specific option for

[PULL 24/24] block.h: remove outdated comment

2022-02-01 Thread Hanna Reitz
From: Emanuele Giuseppe Esposito The comment "disk I/O throttling" doesn't make any sense at all any more. It was added in commit 0563e191516 to describe bdrv_io_limits_enable()/disable(), which were removed in commit 97148076, so the comment is just a forgotten leftover. Suggested-by: Kevin

[PULL 04/24] iotests.py: implement unsupported_imgopts

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy We are going to support some addition IMGOPTS in python iotests like in bash iotests. Similarly to bash iotests, we want a way to skip some tests which can't work with specific IMGOPTS. Globally for python iotests we will not support things like

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

2022-02-01 Thread Kevin Wolf
Am 13.01.2022 um 15:44 hat Peter Lieven geschrieben: > 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:

[PULL 07/24] iotests: drop qemu_img_verbose() helper

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy qemu_img_verbose() has a drawback of not going through generic qemu_img_pipe_and_status(). qemu_img_verbose() is not very popular, so update the only two users to qemu_img_log() and drop qemu_img_verbose() at all. Signed-off-by: Vladimir Sementsov-Ogievskiy

[PULL 08/24] iotests.py: rewrite default luks support in qemu_img

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Move the logic to more generic qemu_img_pipe_and_status(). Also behave better when we have several -o options. And reuse argument parser of course. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Message-Id:

Re: [PATCH v3 0/2] block/export/fuse: Fix build failure on FreeBSD

2022-02-01 Thread Kevin Wolf
Am 01.02.2022 um 12:26 hat Philippe Mathieu-Daudé geschrieben: > Since v2: > - Rearrange if-else-if ladder first (Kevin) > > Philippe Mathieu-Daudé (2): > block/export/fuse: Rearrange if-else-if ladder in fuse_fallocate() > block/export/fuse: Fix build failure on FreeBSD Thanks, applied to

[PULL 12/24] iotests.py: filter compression type out

2022-02-01 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy We want iotests pass with both the default zlib compression and with IMGOPTS='compression_type=zstd'. Actually the only test that is interested in real compression type in test output is 287 (test for qcow2 compression type) and it's in bash. So for now we can

Re: [PATCH v3 2/2] block/export/fuse: Fix build failure on FreeBSD

2022-02-01 Thread Hanna Reitz
On 01.02.22 12:26, Philippe Mathieu-Daudé wrote: When building on FreeBSD we get: [816/6851] Compiling C object libblockdev.fa.p/block_export_fuse.c.o ../block/export/fuse.c:628:16: error: use of undeclared identifier 'FALLOC_FL_KEEP_SIZE' if (mode & FALLOC_FL_KEEP_SIZE) {

Re: [PATCH] qemu-img: Unify [-b [-F]] documentation

2022-02-01 Thread Vladimir Sementsov-Ogievskiy
31.01.2022 16:59, Hanna Reitz wrote: qemu-img convert documents the backing file and backing format options as follows: [-B backing_file [-F backing_fmt]] whereas qemu-img create has this: [-b backing_file] [-F backing_fmt] That is, for convert, we document that -F cannot be given

Re: [PATCH v4 1/4] python/aqmp: Fix negotiation with pre-"oob" QEMU

2022-02-01 Thread Kevin Wolf
Am 01.02.2022 um 05:11 hat John Snow geschrieben: > QEMU versions prior to the "oob" capability *also* can't accept the > "enable" keyword argument at all. Fix the handshake process with older > QEMU versions. > > Signed-off-by: John Snow > Reviewed-by: Hanna Reitz > --- >

Re: [RFC] block/nbd: Move s->ioc on AioContext change

2022-02-01 Thread Vladimir Sementsov-Ogievskiy
01.02.2022 14:40, Hanna Reitz wrote: On 01.02.22 12:18, Vladimir Sementsov-Ogievskiy wrote: 28.01.2022 18:51, Hanna Reitz wrote: s->ioc must always be attached to the NBD node's AioContext.  If that context changes, s->ioc must be attached to the new context. Buglink:

Re: [PATCH] qemu-img: Unify [-b [-F]] documentation

2022-02-01 Thread Kevin Wolf
Am 31.01.2022 um 14:59 hat Hanna Reitz geschrieben: > qemu-img convert documents the backing file and backing format options > as follows: > [-B backing_file [-F backing_fmt]] > whereas qemu-img create has this: > [-b backing_file] [-F backing_fmt] > > That is, for convert, we document

Re: [PATCH v2] qsd: Document fuse's allow-other option

2022-02-01 Thread Kevin Wolf
Am 31.01.2022 um 11:31 hat Hanna Reitz geschrieben: > We did not add documentation to the storage daemon's man page for fuse's > allow-other option when it was introduced, so do that now. > > Fixes: 8fc54f9428b9763f800 ("export/fuse: Add allow-other option") > Signed-off-by: Hanna Reitz Thanks,

Re: [PATCH] block.h: remove outdated comment

2022-02-01 Thread Hanna Reitz
On 31.01.22 13:56, Emanuele Giuseppe Esposito wrote: The comment "disk I/O throttling" doesn't make any sense at all any more. It was added in commit 0563e191516 to describe bdrv_io_limits_enable()/disable(), which were removed in commit 97148076, so the comment is just a forgotten leftover.

Re: [PATCH] block.h: remove outdated comment

2022-02-01 Thread Kevin Wolf
Am 31.01.2022 um 13:56 hat Emanuele Giuseppe Esposito geschrieben: > The comment "disk I/O throttling" doesn't make any sense at all > any more. It was added in commit 0563e191516 to describe > bdrv_io_limits_enable()/disable(), which were removed in commit > 97148076, so the comment is just a

Re: [PATCH v6 01/33] main-loop.h: introduce qemu_in_main_thread()

2022-02-01 Thread Kevin Wolf
Am 01.02.2022 um 12:55 hat Kevin Wolf geschrieben: > Am 31.01.2022 um 16:49 hat Paolo Bonzini geschrieben: > > > > However, commit 5f50be9b5810293141bb53cfd0cb46e765367d56 changed the > > > > stub to return false for a specific reason. > > > > > > I must admit I don't really understand the

Re: [PATCH v6 01/33] main-loop.h: introduce qemu_in_main_thread()

2022-02-01 Thread Kevin Wolf
Am 31.01.2022 um 16:49 hat Paolo Bonzini geschrieben: > > > However, commit 5f50be9b5810293141bb53cfd0cb46e765367d56 changed the > > > stub to return false for a specific reason. > > > > I must admit I don't really understand the reasoning there: > > > > With this change, the stub

Re: [PATCH] block/curl.c: Check error return from curl_easy_setopt()

2022-02-01 Thread Hanna Reitz
On 28.01.22 17:55, Peter Maydell wrote: Coverity points out that we aren't checking the return value from curl_easy_setopt() for any of the calls to it we make in block/curl.c. Fixes: Coverity CID 1459336, 1459482, 1460331 Signed-off-by: Peter Maydell --- Big fat disclaimer: tested only with

Re: [PATCH] block: bdrv_set_backing_hd(): use drained section

2022-02-01 Thread Vladimir Sementsov-Ogievskiy
28.01.2022 17:12, Emanuele Giuseppe Esposito wrote: On 27/01/2022 15:13, Kevin Wolf wrote: Am 25.01.2022 um 11:12 hat Vladimir Sementsov-Ogievskiy geschrieben: 25.01.2022 12:24, Paolo Bonzini wrote: On 1/24/22 18:37, Vladimir Sementsov-Ogievskiy wrote: Graph modifications should be done in

[PATCH v3 2/2] block/export/fuse: Fix build failure on FreeBSD

2022-02-01 Thread Philippe Mathieu-Daudé via
When building on FreeBSD we get: [816/6851] Compiling C object libblockdev.fa.p/block_export_fuse.c.o ../block/export/fuse.c:628:16: error: use of undeclared identifier 'FALLOC_FL_KEEP_SIZE' if (mode & FALLOC_FL_KEEP_SIZE) { ^ ../block/export/fuse.c:651:16: error:

Re: [RFC] block/nbd: Move s->ioc on AioContext change

2022-02-01 Thread Hanna Reitz
On 01.02.22 12:18, Vladimir Sementsov-Ogievskiy wrote: 28.01.2022 18:51, Hanna Reitz wrote: s->ioc must always be attached to the NBD node's AioContext.  If that context changes, s->ioc must be attached to the new context. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1990835

Re: [RFC] block/nbd: Move s->ioc on AioContext change

2022-02-01 Thread Vladimir Sementsov-Ogievskiy
28.01.2022 18:51, Hanna Reitz wrote: s->ioc must always be attached to the NBD node's AioContext. If that context changes, s->ioc must be attached to the new context. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1990835 Signed-off-by: Hanna Reitz --- This is an RFC because I believe

[PATCH v3 1/2] block/export/fuse: Rearrange if-else-if ladder in fuse_fallocate()

2022-02-01 Thread Philippe Mathieu-Daudé via
In order to safely maintain a mixture of #ifdef'ry with if-else-if ladder, rearrange the last statement (!mode) first. Since it is mutually exclusive with the other conditions, checking it first doesn't make any logical difference, but allows to add #ifdef'ry around in a more cleanly way.

[PATCH v3 0/2] block/export/fuse: Fix build failure on FreeBSD

2022-02-01 Thread Philippe Mathieu-Daudé via
Since v2: - Rearrange if-else-if ladder first (Kevin) Philippe Mathieu-Daudé (2): block/export/fuse: Rearrange if-else-if ladder in fuse_fallocate() block/export/fuse: Fix build failure on FreeBSD block/export/fuse.c | 45 + 1 file changed, 25

Re: [RFC PATCH] block/export/fuse: Fix build failure on FreeBSD

2022-02-01 Thread Philippe Mathieu-Daudé via
On 1/27/22 17:15, Kevin Wolf wrote: > Am 22.01.2022 um 14:49 hat Philippe Mathieu-Daudé geschrieben: >> When building on FreeBSD we get: >> >> [816/6851] Compiling C object libblockdev.fa.p/block_export_fuse.c.o >> ../block/export/fuse.c:628:16: error: use of undeclared identifier >>

Re: [PATCH v6 01/33] main-loop.h: introduce qemu_in_main_thread()

2022-02-01 Thread Paolo Bonzini
On 2/1/22 10:08, Emanuele Giuseppe Esposito wrote: + * + * This function should never be used in the block layer, please + * instead refer to qemu_in_main_thread(). This function should never be used in the block layer, because unit tests, block layer tools and qemu-storage-daemon do not

Re: [PATCH v6 02/33] include/block/block: split header into I/O and global state API

2022-02-01 Thread Paolo Bonzini
On 2/1/22 10:45, Emanuele Giuseppe Esposito wrote: That said, even if they are a different category, I think it makes sense to leave them in the same header file as I/O functions, because I/O functions are locked out between drained_begin and drained_end. Proposed category description: /* *

Re: [PATCH v6 02/33] include/block/block: split header into I/O and global state API

2022-02-01 Thread Emanuele Giuseppe Esposito
On 31/01/2022 16:58, Paolo Bonzini wrote: > On 1/31/22 15:54, Kevin Wolf wrote: >> So I guess the decision depends on what you're going to use the >> categories in the future. I get the feeling that we have one more >> category than this series introduces: >> >> * Global State (must run from

Re: [PATCH v8 1/5] QIOChannel: Add flags on io_writev and introduce io_flush callback

2022-02-01 Thread Daniel P . Berrangé
On Tue, Feb 01, 2022 at 03:28:59AM -0300, Leonardo Bras wrote: > Add flags to io_writev and introduce io_flush as optional callback to > QIOChannelClass, allowing the implementation of zero copy writes by > subclasses. > > How to use them: > - Write data using

Re: [PATCH v6 01/33] main-loop.h: introduce qemu_in_main_thread()

2022-02-01 Thread Emanuele Giuseppe Esposito
On 31/01/2022 16:49, Paolo Bonzini wrote: > On 1/31/22 15:33, Kevin Wolf wrote: >> I feel "use this function if your code is going to be used by unit >> tests, but use qemu_mutex_iothread_locked() otherwise" is a very strange >> interface. I'm relatively sure that qemu_mutex_iothread_locked()

Re: [PATCH 2/5] docs: Only mention iscsi in the man page when available

2022-02-01 Thread Kevin Wolf
Am 31.01.2022 um 19:57 hat Peter Maydell geschrieben: > On Mon, 31 Jan 2022 at 17:33, Kevin Wolf wrote: > > > > If libiscsi is disabled in the build, the man page shouldn't contain > > information on how to construct iscsi URLs etc. > > > > This patch is best viewed with whitespace changes