[PATCH] scsi-disk: Don't silently truncate serial number

2024-06-04 Thread Kevin Wolf
y truncate the serial number string any more, but just error out if it would be truncated. Buglink: https://issues.redhat.com/browse/RHEL-3542 Suggested-by: Peter Krempa Signed-off-by: Kevin Wolf --- hw/scsi/scsi-disk.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff

Re: [PATCH v3 2/4] block-backend: fix edge case in bdrv_next() where BDS associated to BB changes

2024-06-04 Thread Kevin Wolf
Am 04.06.2024 um 09:58 hat Fiona Ebner geschrieben: > Am 03.06.24 um 18:21 schrieb Kevin Wolf: > > Am 03.06.2024 um 16:17 hat Fiona Ebner geschrieben: > >> Am 26.03.24 um 13:44 schrieb Kevin Wolf: > >>> > >>> The fix for bdrv_flush_all(

Re: [PATCH v3 2/4] block-backend: fix edge case in bdrv_next() where BDS associated to BB changes

2024-06-03 Thread Kevin Wolf
Am 03.06.2024 um 16:17 hat Fiona Ebner geschrieben: > Hi Kevin, > > Am 26.03.24 um 13:44 schrieb Kevin Wolf: > > Am 22.03.2024 um 10:50 hat Fiona Ebner geschrieben: > >> The old_bs variable in bdrv_next() is currently determined by looking > >> at the old blo

Re: [PATCH v3 2/2] iotests: test NBD+TLS+iothread

2024-06-03 Thread Kevin Wolf
Am 03.06.2024 um 13:45 hat Daniel P. Berrangé geschrieben: > On Fri, May 31, 2024 at 01:04:59PM -0500, Eric Blake wrote: > > Prevent regressions when using NBD with TLS in the presence of > > iothreads, adding coverage the fix to qio channels made in the > > previous patch. > > > > The shell

Re: [PATCH] block/copy-before-write: use uint64_t for timeout in nanoseconds

2024-06-03 Thread Kevin Wolf
Am 03.06.2024 um 16:45 hat Fiona Ebner geschrieben: > Am 28.05.24 um 18:06 schrieb Kevin Wolf: > > Am 29.04.2024 um 16:19 hat Fiona Ebner geschrieben: > >> rather than the uint32_t for which the maximum is slightly more than 4 > >> seconds and larger values would o

Re: [PATCH 0/2] block/crypto: do not require number of threads upfront

2024-06-03 Thread Kevin Wolf
Am 27.05.2024 um 17:58 hat Stefan Hajnoczi geschrieben: > The block layer does not know how many threads will perform I/O. It is > possible > to exceed the number of threads that is given to qcrypto_block_open() and this > can trigger an assertion failure in qcrypto_block_pop_cipher(). > > This

Re: [PATCH v3 5/6] iotests: Filter out `vvfat` fmt from failing tests

2024-05-31 Thread Kevin Wolf
Am 26.05.2024 um 11:56 hat Amjad Alsharafi geschrieben: > `vvfat` is a special format and not all tests (even generic) can run > without crashing. So, added `unsupported_fmt: vvfat` to all failling > tests. > > Also added `vvfat` format into `meson.build`, vvfaat tests can be run > on the

Re: [PATCH v3 0/6] vvfat: Fix write bugs for large files and add iotests

2024-05-31 Thread Kevin Wolf
Am 26.05.2024 um 11:56 hat Amjad Alsharafi geschrieben: > These patches fix some bugs found when modifying files in vvfat. > First, there was a bug when writing to the cluster 2 or above of a file, it > will copy the cluster before it instead, so, when writing to cluster=2, the > content of

Re: [PATCH v3 1/6] vvfat: Fix bug in writing to middle of file

2024-05-31 Thread Kevin Wolf
for the read operation. > > This is due to off-by-one error here, where `i=0x2000 !< offset=0x2000`, > thus not fetching the next cluster. > > Signed-off-by: Amjad Alsharafi Reviewed-by: Kevin Wolf Tested-by: Kevin Wolf > diff --git a/block/vvfat.c b/block/vvfat.c >

Re: [PATCH v2 2/2] iotests: test NBD+TLS+iothread

2024-05-31 Thread Kevin Wolf
Am 18.05.2024 um 04:50 hat Eric Blake geschrieben: > Prevent regressions when using NBD with TLS in the presence of > iothreads, adding coverage the fix to qio channels made in the > previous patch. > > CC: qemu-sta...@nongnu.org > Signed-off-by: Eric Blake > diff --git

Re: [PATCH v1 1/2] machine/microvm: support for loading EIF image

2024-05-31 Thread Kevin Wolf
Am 31.05.2024 um 09:54 hat Alexander Graf geschrieben: > > On 22.05.24 19:23, Dorjoy Chowdhury wrote: > > Hi Daniel, > > Thanks for reviewing. > > > > On Wed, May 22, 2024 at 9:32 PM Daniel P. Berrangé > > wrote: > > > On Sat, May 18, 2024 at 02:07:52PM +0600, Dorjoy Chowdhury wrote: > > > >

Re: [PATCH 0/2] block/crypto: do not require number of threads upfront

2024-05-29 Thread Kevin Wolf
; I'm not familiar with this code or a crypto expert. I would assume the same, but I'm not merging this yet because I think you said you'd like to have input from danpb? Reviewed-by: Kevin Wolf

Re: [PATCH 1/2] Revert "monitor: use aio_co_reschedule_self()"

2024-05-29 Thread Kevin Wolf
Am 29.05.2024 um 12:33 hat Fiona Ebner geschrieben: > CC-ing stable since 1f25c172f83704e350c0829438d832384084a74d is in 9.0.0 Good point, I'm also updating the commit message in my tree to add a Cc: line. Thanks for catching this, Fiona! Kevin

Re: block snapshot issue with RBD

2024-05-29 Thread Kevin Wolf
Am 29.05.2024 um 12:14 hat Fiona Ebner geschrieben: > I bisected this issue to d3007d348a ("block: Fix crash when loading > snapshot on inactive node"). > > > diff --git a/block/snapshot.c b/block/snapshot.c > > index ec8cf4810b..c4d40e80dd 100644 > > --- a/block/snapshot.c > > +++

Re: [PATCH v5] linux-aio: add IO_CMD_FDSYNC command support

2024-05-28 Thread Kevin Wolf
Am 25.04.2024 um 09:04 hat Prasad Pandit geschrieben: > From: Prasad Pandit > > Libaio defines IO_CMD_FDSYNC command to sync all outstanding > asynchronous I/O operations, by flushing out file data to the > disk storage. Enable linux-aio to submit such aio request. > > When using aio=native

Re: [PATCH] block/copy-before-write: use uint64_t for timeout in nanoseconds

2024-05-28 Thread Kevin Wolf
Am 29.04.2024 um 16:19 hat Fiona Ebner geschrieben: > rather than the uint32_t for which the maximum is slightly more than 4 > seconds and larger values would overflow. The QAPI interface allows > specifying the number of seconds, so only values 0 to 4 are safe right > now, other values lead to a

Re: [PATCH] qemu-io: add cvtnum() error handling for zone commands

2024-05-28 Thread Kevin Wolf
Am 07.05.2024 um 20:05 hat Stefan Hajnoczi geschrieben: > cvtnum() parses positive int64_t values and returns a negative errno on > failure. Print errors and return early when cvtnum() fails. > > While we're at it, also reject nr_zones values greater or equal to 2^32 > since they cannot be

Re: [PATCH 0/2] Revert "monitor: use aio_co_reschedule_self()"

2024-05-28 Thread Kevin Wolf
Am 06.05.2024 um 21:06 hat Stefan Hajnoczi geschrieben: > This series fixes RHEL-34618 "qemu crash on Assertion `luringcb->co->ctx == > s->aio_context' failed when do block_resize on hotplug disk with > aio=io_uring": > https://issues.redhat.com/browse/RHEL-34618 > > Kevin identified commit

Re: [PATCH v2 0/3] docs: define policy forbidding use of "AI" / LLM code generators

2024-05-28 Thread Kevin Wolf
t code provenance / sign-off > docs: define policy limiting the inclusion of generated files > docs: define policy forbidding use of AI code generators > > docs/devel/code-provenance.rst| 315 ++ > docs/devel/index-process.rst | 1 + > docs/devel/submitting-a-patch.rst | 19 +- > 3 files changed, 318 insertions(+), 17 deletions(-) > create mode 100644 docs/devel/code-provenance.rst Reviewed-by: Kevin Wolf

Re: [PATCH v2 2/3] docs: define policy limiting the inclusion of generated files

2024-05-28 Thread Kevin Wolf
Am 16.05.2024 um 18:22 hat Daniel P. Berrangé geschrieben: > Files contributed to QEMU are generally expected to be provided in the > preferred format for manipulation. IOW, we generally don't expect to > have generated / compiled code included in the tree, rather, we expect > to run the code

Re: [PATCH 1/1] block: drop force_dup parameter of raw_reconfigure_getfd()

2024-05-28 Thread Kevin Wolf
Am 30.04.2024 um 19:02 hat Denis V. Lunev via geschrieben: > This parameter is always passed as 'false' from the caller. > > Signed-off-by: Denis V. Lunev > CC: Andrey Zhadchenko > CC: Kevin Wolf > CC: Hanna Reitz Let me add a "Since commit 72373e40fbc" to

Re: [PATCH] iotests/pylintrc: allow up to 10 similar lines

2024-05-28 Thread Kevin Wolf
send "[PULL 0/6] Block jobs patches for 2024-04-29" which is blocked > on this problem. Sorry, I only just returned from PTO and now have to catch up with things. But yes, if John doesn't have any objections, it's fine with me, too. Reviewed-by: Kevin Wolf

Re: [PATCH v2 5/5] monitor: use aio_co_reschedule_self()

2024-05-03 Thread Kevin Wolf
Am 06.02.2024 um 20:06 hat Stefan Hajnoczi geschrieben: > The aio_co_reschedule_self() API is designed to avoid the race > condition between scheduling the coroutine in another AioContext and > yielding. > > The QMP dispatch code uses the open-coded version that appears > susceptible to the race

Re: [PULL 6/6] iotests: add backup-discard-source

2024-04-30 Thread Kevin Wolf
Am 29.04.2024 um 20:39 hat Vladimir Sementsov-Ogievskiy geschrieben: > [Add John] > > On 29.04.24 17:18, Richard Henderson wrote: > > On 4/29/24 04:51, Vladimir Sementsov-Ogievskiy wrote: > > > Add test for a new backup option: discard-source. > > > > > > Signed-off-by: Vladimir

Re: [PATCH 0/3] Make it possible to compile the x86 binaries without FDC

2024-04-29 Thread Kevin Wolf
[ Cc: qemu-block ] Am 25.04.2024 um 20:43 hat Thomas Huth geschrieben: > For downstream versions of QEMU, we'd like to be able to compile QEMU > without the FDC code included (since it's not required for modern VMs > anymore and the FDC code has rather a bad reputation, see the VENOM CVE). > >

Re: [PATCH v4] linux-aio: add IO_CMD_FDSYNC command support

2024-04-24 Thread Kevin Wolf
Am 14.03.2024 um 12:16 hat Prasad Pandit geschrieben: > From: Prasad Pandit > > Libaio defines IO_CMD_FDSYNC command to sync all outstanding > asynchronous I/O operations, by flushing out file data to the > disk storage. > > Enable linux-aio to submit such aio request. This helps to > reduce

[PATCH for-9.0?] usb-storage: Fix BlockConf defaults

2024-04-12 Thread Kevin Wolf
') Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2260 Reported-by: Jonas Svensson Signed-off-by: Kevin Wolf --- Considering this a candidate for 9.0 given that we're already having an rc4, it's a regression from 8.2 and breaks installing Windows from USB hw/usb/dev-storage-classic.c | 9

Re: [PATCH-for-9.0 v2 0/3] hw/block/nand: Fix out-of-bound access in NAND block buffer

2024-04-09 Thread Kevin Wolf
Am 09.04.2024 um 15:59 hat Philippe Mathieu-Daudé geschrieben: > Fix for https://gitlab.com/qemu-project/qemu/-/issues/1446 > > Since v1: > - Addressed Kevin trivial suggestions (unsigned offset) You already kept the Reviewed-by tags, but looks good to me. Kevin

Re: [PATCH-for-9.0? 0/3] hw/block/nand: Fix out-of-bound access in NAND block buffer

2024-04-09 Thread Kevin Wolf
t; hw/block/nand: Fix out-of-bound access in NAND block buffer As we're short on time for 9.0: Reviewed-by: Kevin Wolf But it feels to me like this device could use some more cleanup to make the code more robust. Kevin

Re: [PATCH-for-9.0? 1/3] hw/block/nand: Factor nand_load_iolen() method out

2024-04-09 Thread Kevin Wolf
Am 08.04.2024 um 10:36 hat Philippe Mathieu-Daudé geschrieben: > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/block/nand.c | 32 +++- > 1 file changed, 19 insertions(+), 13 deletions(-) > > diff --git a/hw/block/nand.c b/hw/block/nand.c > index

Re: [PATCH v8] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2024-04-02 Thread Kevin Wolf
Am 29.03.2024 um 04:45 hat Shaoqin Huang geschrieben: > Hi Daniel, > > On 3/25/24 16:55, Daniel P. Berrangé wrote: > > On Mon, Mar 25, 2024 at 01:35:58PM +0800, Shaoqin Huang wrote: > > > Hi Daniel, > > > > > > Thanks for your reviewing. I see your comments in the v7. > > > > > > I have some

Re: [PATCH] block: Remove unnecessary NULL check in bdrv_pad_request()

2024-04-02 Thread Kevin Wolf
Am 02.04.2024 um 12:53 hat Philippe Mathieu-Daudé geschrieben: > On 27/3/24 20:27, Kevin Wolf wrote: > > Coverity complains that the check introduced in commit 3f934817 suggests > > that qiov could be NULL and we dereference it before reaching the check. > > In fact, all of t

Re: [PATCH v1] coroutine: avoid inserting duplicate coroutine to co_queue_wakeup

2024-03-28 Thread Kevin Wolf
Am 27.03.2024 um 23:13 hat Eric Blake geschrieben: > On Mon, Mar 25, 2024 at 11:50:41AM -0400, Stefan Hajnoczi wrote: > > On Mon, Mar 25, 2024 at 05:18:50PM +0800, zhuyangyang wrote: > > > If g_main_loop_run()/aio_poll() is called in the coroutine context, > > > the pending coroutine may be woken

[PATCH] block: Remove unnecessary NULL check in bdrv_pad_request()

2024-03-27 Thread Kevin Wolf
Coverity complains that the check introduced in commit 3f934817 suggests that qiov could be NULL and we dereference it before reaching the check. In fact, all of the callers pass a non-NULL pointer, so just remove the misleading check. Resolves: Coverity CID 1542668 Signed-off-by: Kevin Wolf

[PULL 3/6] block/io: accept NULL qiov in bdrv_pad_request

2024-03-26 Thread Kevin Wolf
quot;device": > "node1" } } > EOF Originally-by: Stefan Reiter Signed-off-by: Thomas Lamprecht [FE: do update bytes and offset in any case add reproducer to commit message] Signed-off-by: Fiona Ebner Message-ID: <20240322095009.346989-2-f.eb...@proxmox.com> Reviewe

[PULL 6/6] iotests: add test for stream job with an unaligned prefetch read

2024-03-26 Thread Kevin Wolf
during iteration in bdrv_flush_all() could lead to unreferencing the wrong block driver state and an assertion failure later. Signed-off-by: Fiona Ebner Message-ID: <20240322095009.346989-5-f.eb...@proxmox.com> Reviewed-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevi

[PULL 2/6] vdpa-dev: Fix initialisation order to restore VDUSE compatibility

2024-03-26 Thread Kevin Wolf
doesn't change for this device. Cc: qemu-sta...@nongnu.org Fixes: 6c4825476a43 ('vdpa: move vhost_vdpa_set_vring_ready to the caller') Signed-off-by: Kevin Wolf Message-ID: <20240315155949.86066-1-kw...@redhat.com> Reviewed-by: Eugenio Pérez Reviewed-by: Stefano Garzarella Signed-off-by:

[PULL 4/6] block-backend: fix edge case in bdrv_next() where BDS associated to BB changes

2024-03-26 Thread Kevin Wolf
cked (fn=..., job=...) > #8 job_do_finalize_locked (job=...) > #9 job_exit (opaque=...) > #10 aio_bh_poll (ctx=...) > #11 aio_poll (ctx=..., blocking=...) > #12 bdrv_poll_co (s=...) > #13 bdrv_flush (bs=...) > #14 bdrv_flush_all () > #15 do_vm_stop (state=..., send_stop=...) > #16

[PULL 5/6] block-backend: fix edge case in bdrv_next_cleanup() where BDS associated to BB changes

2024-03-26 Thread Kevin Wolf
referenced previously anymore. Instead, rely on bdrv_next() to set it->bs to the BDS it referenced and unreference that one in any case. Signed-off-by: Fiona Ebner Message-ID: <20240322095009.346989-4-f.eb...@proxmox.com> Reviewed-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi Signed

[PULL 1/6] tests/qemu-iotests: Test 157 and 227 require virtio-blk

2024-03-26 Thread Kevin Wolf
com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- tests/qemu-iotests/157 | 2 ++ tests/qemu-iotests/227 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/qemu-iotests/157 b/tests/qemu-iotests/157 index 0dc9ba68d2..aa2ebbfb4b 100755 --- a/tests/qemu-iotests/157 +++ b/test

[PULL 0/6] Block layer patches

2024-03-26 Thread Kevin Wolf
in bdrv_next_cleanup() where BDS associated to BB changes iotests: add test for stream job with an unaligned prefetch read Kevin Wolf (1): vdpa-dev: Fix initialisation order to restore VDUSE compatibility Stefan Reiter (1): block/io: accept NULL qiov in bdrv_pad_request Thomas

Re: [PATCH v3 0/4] fix two edge cases related to stream block jobs

2024-03-26 Thread Kevin Wolf
Am 25.03.2024 um 21:11 hat Stefan Hajnoczi geschrieben: > On Fri, Mar 22, 2024 at 10:50:05AM +0100, Fiona Ebner wrote: > > Changes in v3: > > * Also deal with edge case in bdrv_next_cleanup(). Haven't run > > into an actual issue there, but at least the caller in > >

Re: [PATCH v3 2/4] block-backend: fix edge case in bdrv_next() where BDS associated to BB changes

2024-03-26 Thread Kevin Wolf
Am 22.03.2024 um 10:50 hat Fiona Ebner geschrieben: > The old_bs variable in bdrv_next() is currently determined by looking > at the old block backend. However, if the block graph changes before > the next bdrv_next() call, it might be that the associated BDS is not > the same that was referenced

Re: [PATCH] tests/qemu-iotests: Test 157 and 227 require virtio-blk

2024-03-26 Thread Kevin Wolf
Am 25.03.2024 um 16:47 hat Thomas Huth geschrieben: > Tests 157 and 227 use the virtio-blk device, so we have to mark these > tests accordingly to be skipped if this devices is not available (e.g. > when running the tests with qemu-system-avr only). > > Signed-off-by: Thomas Huth Thanks,

Re: [PATCH] coroutine: cap per-thread local pool size

2024-03-21 Thread Kevin Wolf
Am 20.03.2024 um 15:09 hat Daniel P. Berrangé geschrieben: > On Wed, Mar 20, 2024 at 09:35:39AM -0400, Stefan Hajnoczi wrote: > > On Tue, Mar 19, 2024 at 08:10:49PM +, Daniel P. Berrangé wrote: > > > On Tue, Mar 19, 2024 at 01:55:10PM -0400, Stefan Hajnoczi wrote: > > > > On Tue, Mar 19, 2024

Re: [PATCH] coroutine: cap per-thread local pool size

2024-03-19 Thread Kevin Wolf
Am 19.03.2024 um 18:10 hat Daniel P. Berrangé geschrieben: > On Tue, Mar 19, 2024 at 05:54:38PM +0100, Kevin Wolf wrote: > > Am 19.03.2024 um 14:43 hat Daniel P. Berrangé geschrieben: > > > On Mon, Mar 18, 2024 at 02:34:29PM -0400, Stefan Hajnoczi wrote: > > > > The

Re: [PATCH] coroutine: cap per-thread local pool size

2024-03-19 Thread Kevin Wolf
Am 19.03.2024 um 14:43 hat Daniel P. Berrangé geschrieben: > On Mon, Mar 18, 2024 at 02:34:29PM -0400, Stefan Hajnoczi wrote: > > The coroutine pool implementation can hit the Linux vm.max_map_count > > limit, causing QEMU to abort with "failed to allocate memory for stack" > > or "failed to set

Re: [PATCH] coroutine: cap per-thread local pool size

2024-03-19 Thread Kevin Wolf
l-fix-sizing > > Buglink: https://issues.redhat.com/browse/RHEL-28947 > Reported-by: Sanjay Rao > Reported-by: Boaz Ben Shabat > Reported-by: Joe Mario > Signed-off-by: Stefan Hajnoczi Reviewed-by: Kevin Wolf Though I do wonder if we can do something about the slight perfo

Re: [PATCH for-9.0 v3] vdpa-dev: Fix initialisation order to restore VDUSE compatibility

2024-03-19 Thread Kevin Wolf
Am 18.03.2024 um 20:27 hat Eugenio Perez Martin geschrieben: > On Mon, Mar 18, 2024 at 10:02 AM Michael S. Tsirkin wrote: > > > > On Mon, Mar 18, 2024 at 12:31:26PM +0800, Jason Wang wrote: > > > On Fri, Mar 15, 2024 at 11:59 PM Kevin Wolf wrote: > > > > &g

[PULL 11/15] tests/qemu-iotests: Restrict test 156 to the 'file' protocol

2024-03-18 Thread Kevin Wolf
Signed-off-by: Thomas Huth Message-ID: <2024031508.153201-7-th...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- tests/qemu-iotests/156 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/156 b/tests/qemu-iotests/156 index a9540b

[PULL 09/15] tests/qemu-iotests: Restrict test 130 to the 'file' protocol

2024-03-18 Thread Kevin Wolf
From: Thomas Huth Using "-drive ...,backing.file.filename=..." only works with the file protocol, but not with URIs, so mark this test accordingly. Signed-off-by: Thomas Huth Message-ID: <2024031508.153201-5-th...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin

[PULL 15/15] iotests: adapt to output change for recently introduced 'detached header' field

2024-03-18 Thread Kevin Wolf
niel P. Berrangé Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- tests/qemu-iotests/198.out | 2 ++ tests/qemu-iotests/206.out | 1 + 2 files changed, 3 insertions(+) diff --git a/tests/qemu-iotests/198.out b/tests/qemu-iotests/198.out index 805494916f..62fb73fa3e 100644 --- a/tests/qemu

[PULL 14/15] tests/qemu-iotests: Restrict tests using "--blockdev file" to the file protocol

2024-03-18 Thread Kevin Wolf
From: Thomas Huth Tests that use "--blockdev" with the "file" driver cannot work with other protocols, so we should mark them accordingly. Signed-off-by: Thomas Huth Message-ID: <2024031508.153201-10-th...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: K

[PULL 02/15] nbd/server: Fix race in draining the export

2024-03-18 Thread Kevin Wolf
fd6afc501a01 ("nbd/server: Use drained block ops to quiesce the server") Signed-off-by: Kevin Wolf Message-ID: <20240314165825.40261-2-kw...@redhat.com> Signed-off-by: Kevin Wolf --- nbd/server.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a

[PULL 08/15] tests/qemu-iotests: Restrict test 114 to the 'file' protocol

2024-03-18 Thread Kevin Wolf
emu-build/tests/qemu-iotests/scratch/qcow2-ssh-114/t.qcow2.orig' for writing: No such file or directory Thus mark this test for "file protocol only" accordingly. Signed-off-by: Thomas Huth Message-ID: <2024031508.153201-4-th...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by:

[PULL 06/15] tests/qemu-iotests: Fix test 033 for running with non-file protocols

2024-03-18 Thread Kevin Wolf
viewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- tests/qemu-iotests/033 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/033 b/tests/qemu-iotests/033 index da9133c44b..4bc7a071bd 100755 --- a/tests/qemu-iotests/033 +++ b/tests/qemu-iotests/033 @@

[PULL 01/15] mirror: Don't call job_pause_point() under graph lock

2024-03-18 Thread Kevin Wolf
://issues.redhat.com/browse/RHEL-28125 Fixes: 004915a96a7a ("block: Protect bs->backing with graph_lock") Signed-off-by: Kevin Wolf Message-ID: <20240313153000.33121-1-kw...@redhat.com> Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- include/qemu/job.h | 2 +- block/mirror.c | 10

[PULL 13/15] tests/qemu-iotests: Fix some tests that use --image-opts for other protocols

2024-03-18 Thread Kevin Wolf
com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- tests/qemu-iotests/263| 6 -- tests/qemu-iotests/284| 7 +++ tests/qemu-iotests/tests/detect-zeroes-registered-buf | 4 +++- 3 files changed, 10 insertions(+), 7 de

[PULL 07/15] tests/qemu-iotests: Restrict test 066 to the 'file' protocol

2024-03-18 Thread Kevin Wolf
From: Thomas Huth The hand-crafted json statement in this test only works if the test is run with the "file" protocol, so mark this test accordingly. Signed-off-by: Thomas Huth Message-ID: <2024031508.153201-3-th...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin

[PULL 04/15] blockdev: Fix blockdev-snapshot-sync error reporting for no medium

2024-03-18 Thread Kevin Wolf
or": {"class": "GenericError", "desc": "Device '(null)' has no medium"}} Broken when commit 0901f67ecdb made @device optional. Use bdrv_get_device_or_node_name() instead. Now it fails as it should: <- {"error": {"class": &q

[PULL 10/15] tests/qemu-iotests: Restrict test 134 and 158 to the 'file' protocol

2024-03-18 Thread Kevin Wolf
Block for encryption") Signed-off-by: Thomas Huth Message-ID: <2024031508.153201-6-th...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- tests/qemu-iotests/134 | 2 +- tests/qemu-iotests/158 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/te

[PULL 00/15] Block layer patches

2024-03-18 Thread Kevin Wolf
Formatting in snapshot list Fiona Ebner (1): iotests: adapt to output change for recently introduced 'detached header' field Kevin Wolf (3): mirror: Don't call job_pause_point() under graph lock nbd/server: Fix race in draining the export iotests: Add test for reset

[PULL 03/15] iotests: Add test for reset/AioContext switches with NBD exports

2024-03-18 Thread Kevin Wolf
to find a different easy way to trigger the bug, but couldn't find one. Signed-off-by: Kevin Wolf Message-ID: <20240314165825.40261-3-kw...@redhat.com> Signed-off-by: Kevin Wolf --- tests/qemu-iotests/tests/iothreads-nbd-export | 66 +++ .../tests/iothreads-nbd-expo

[PULL 05/15] qemu-img: Fix Column Width and Improve Formatting in snapshot list

2024-03-18 Thread Kevin Wolf
nd 286] Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qapi.c | 10 ++-- tests/qemu-iotests/176.out| 16 +++ tests/qemu-iotests/261| 4 +- tests/qemu-iotests/267.out| 48 +--

[PULL 12/15] tests/qemu-iotests: Restrict tests that use --image-opts to the 'file' protocol

2024-03-18 Thread Kevin Wolf
: <2024031508.153201-8-th...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- tests/qemu-iotests/188 | 2 +- tests/qemu-iotests/189 | 2 +- tests/qemu-iotests/198 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/188 b/tests/qemu-iotests/188

Re: [PATCH] iotests: adapt to output change for recently introduced 'detached header' field

2024-03-18 Thread Kevin Wolf
Am 16.02.2024 um 11:14 hat Fiona Ebner geschrieben: > Failure was noticed when running the tests for the qcow2 image format. > > Fixes: 0bd779e27e ("crypto: Introduce 'detached-header' field in > QCryptoBlockInfoLUKS") > Signed-off-by: Fiona Ebner Thanks, applied to the block branch. Kevin

Re: [PATCH 0/9] tests/qemu-iotests: Fix running with "check -ssh -qcow2"

2024-03-18 Thread Kevin Wolf
Am 15.03.2024 um 12:10 hat Thomas Huth geschrieben: > I recently wanted to check for some changes that I did to the URI handling > in the block layer code, but I had to discover that a lot of iotests only > work with the raw file format when using a protocol that is not "file", > i.e. "./check

Re: [PATCH v4] qemu-img: Fix Column Width and Improve Formatting in snapshot list

2024-03-18 Thread Kevin Wolf
Am 23.01.2024 um 06:03 hat Abhiram Tilak geschrieben: > When running the command `qemu-img snapshot -l SNAPSHOT` the output of > VM_CLOCK (measures the offset between host and VM clock) cannot to > accommodate values in the order of thousands (4-digit). > > This line [1] hints on the problem.

Re: [PATCH] blockdev: Fix blockdev-snapshot-sync error reporting for no medium

2024-03-18 Thread Kevin Wolf
Am 06.03.2024 um 15:28 hat Markus Armbruster geschrieben: > When external_snapshot_abort() rejects a BlockDriverState without a > medium, it creates an error like this: > > error_setg(errp, "Device '%s' has no medium", device); > > Trouble is @device can be null. My system formats null

Re: [PATCH for-9.0] mirror: Don't call job_pause_point() under graph lock

2024-03-18 Thread Kevin Wolf
Am 14.03.2024 um 15:29 hat Stefan Hajnoczi geschrieben: > On Wed, Mar 13, 2024 at 04:30:00PM +0100, Kevin Wolf wrote: > > Calling job_pause_point() while holding the graph reader lock > > potentially results in a deadlock: bdrv_graph_wrlock() first drains > > everything, inc

[PATCH for-9.0 v3] vdpa-dev: Fix initialisation order to restore VDUSE compatibility

2024-03-15 Thread Kevin Wolf
doesn't change for this device. Cc: qemu-sta...@nongnu.org Fixes: 6c4825476a4351530bcac17abab72295b75ffe98 Signed-off-by: Kevin Wolf --- v2: - Actually make use of the @enable parameter - Change vhost_net to preserve the current behaviour v3: - Updated trace point [Stefano] - Fixed typo

Re: [PATCH for-9.0 v2] vdpa-dev: Fix initialisation order to restore VDUSE compatibility

2024-03-15 Thread Kevin Wolf
Am 15.03.2024 um 16:07 hat Stefano Garzarella geschrieben: > On Fri, Mar 15, 2024 at 03:03:31PM +0100, Kevin Wolf wrote: > > VDUSE requires that virtqueues are first enabled before the DRIVER_OK > > status flag is set; with the current API of the kernel module, it is > >

[PATCH for-9.0 v2] vdpa-dev: Fix initialisation order to restore VDUSE compatibility

2024-03-15 Thread Kevin Wolf
doesn't change for this device. Cc: qemu-sta...@nongnu.org Fixes: 6c4825476a4351530bcac17abab72295b75ffe98 Signed-off-by: Kevin Wolf --- v2: - Actually make use of the @enable parameter - Change vhost_net to preserve the current behaviour hw/net/vhost_net.c | 10 ++ hw/virtio/vdpa

[PATCH for-9.0 2/2] iotests: Add test for reset/AioContext switches with NBD exports

2024-03-14 Thread Kevin Wolf
to find a different easy way to trigger the bug, but couldn't find one. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/tests/iothreads-nbd-export | 66 +++ .../tests/iothreads-nbd-export.out| 19 ++ 2 files changed, 85 insertions(+) create mode 100755 tests/qemu

[PATCH for-9.0 0/2] nbd: Fix server crash on reset with iothreads

2024-03-14 Thread Kevin Wolf
Kevin Wolf (2): nbd/server: Fix race in draining the export iotests: Add test for reset/AioContext switches with NBD exports nbd/server.c | 15 ++--- tests/qemu-iotests/tests/iothreads-nbd-export | 66 +++ .../tests/iothreads-nbd-export.out

[PATCH for-9.0 1/2] nbd/server: Fix race in draining the export

2024-03-14 Thread Kevin Wolf
.@nongnu.org Fixes: fd6afc501a019682d1b8468b562355a2887087bd Signed-off-by: Kevin Wolf --- nbd/server.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/nbd/server.c b/nbd/server.c index 941832f178..c3484cc1eb 100644 --- a/nbd/server.c +++ b/nbd/server.c @@ -3007,8 +3007,8 @@ stati

[PATCH for-9.0] mirror: Don't call job_pause_point() under graph lock

2024-03-13 Thread Kevin Wolf
://issues.redhat.com/browse/RHEL-28125 Fixes: 004915a96a7a40e942ac85e6d22518cbcd283506 Signed-off-by: Kevin Wolf --- include/qemu/job.h | 2 +- block/mirror.c | 10 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/qemu/job.h b/include/qemu/job.h index 9ea98b5927..2b873f2576

Re: [PATCH for 9.0] migration: Skip only empty block devices

2024-03-13 Thread Kevin Wolf
tion. When one device is found to be empty (sectors > > == 0), the loop exits and all the remaining devices are ignored. This > > is a regression introduced when bdrv_iterate() was removed. > > > > Change that by skipping only empty devices. > > > > Cc: Marku

Re: [PATCH v2 00/10] mirror: allow switching from background to active mode

2024-03-12 Thread Kevin Wolf
Am 12.03.2024 um 14:44 hat Vladimir Sementsov-Ogievskiy geschrieben: > On 11.03.24 18:15, Vladimir Sementsov-Ogievskiy wrote: > > On 08.03.24 11:52, Kevin Wolf wrote: > > > Am 07.03.2024 um 20:42 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > > On 04.0

Re: [PATCH] virtio-blk: iothread-vq-mapping coroutine pool sizing

2024-03-12 Thread Kevin Wolf
Am 11.03.2024 um 21:14 hat Stefan Hajnoczi geschrieben: > It is possible to hit the sysctl vm.max_map_count limit when the > coroutine pool size becomes large. Each coroutine requires two mappings > (one for the stack and one for the guard page). QEMU can crash with > "failed to set up stack guard

Re: [PATCH v2] linux-aio: add IO_CMD_FDSYNC command support

2024-03-12 Thread Kevin Wolf
Am 11.03.2024 um 20:36 hat Stefan Hajnoczi geschrieben: > On Mon, Mar 11, 2024 at 04:40:05PM +0100, Kevin Wolf wrote: > > Am 11.03.2024 um 14:09 hat Stefan Hajnoczi geschrieben: > > > On Mon, Mar 11, 2024 at 11:13:33AM +0530, Prasad Pandit wrote: > >

Re: [PATCH v2] linux-aio: add IO_CMD_FDSYNC command support

2024-03-11 Thread Kevin Wolf
Am 11.03.2024 um 14:09 hat Stefan Hajnoczi geschrieben: > On Mon, Mar 11, 2024 at 11:13:33AM +0530, Prasad Pandit wrote: > > From: Prasad Pandit > > > > Libaio defines IO_CMD_FDSYNC command to sync all outstanding > > asynchronous I/O operations, by flushing out file data to the > > disk

Re: [PATCH] linux-aio: add IO_CMD_FDSYNC command support

2024-03-08 Thread Kevin Wolf
Am 07.03.2024 um 18:19 hat Prasad Pandit geschrieben: > Hi, > > On Thu, 7 Mar 2024 at 19:21, Kevin Wolf wrote: > > Kernel support for this is "relatively" new, added in 2018. Should we > > fall back to the thread pool if we receive -EINVAL? > > laio_co_submi

Re: [PATCH v2 00/10] mirror: allow switching from background to active mode

2024-03-08 Thread Kevin Wolf
Am 07.03.2024 um 20:42 hat Vladimir Sementsov-Ogievskiy geschrieben: > On 04.03.24 14:09, Peter Krempa wrote: > > On Mon, Mar 04, 2024 at 11:48:54 +0100, Kevin Wolf wrote: > > > Am 28.02.2024 um 19:07 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > > On 03.11.23

Re: [PATCH] linux-aio: add IO_CMD_FDSYNC command support

2024-03-07 Thread Kevin Wolf
Am 07.03.2024 um 12:47 hat Prasad Pandit geschrieben: > From: Prasad Pandit > > Libaio defines IO_CMD_FDSYNC command to sync all outstanding > asynchronous I/O operations, by flushing out file data to the > disk storage. > > Enable linux-aio to submit such aio request. This helps to > reduce

Re: [PATCH v2 00/10] mirror: allow switching from background to active mode

2024-03-04 Thread Kevin Wolf
Am 28.02.2024 um 19:07 hat Vladimir Sementsov-Ogievskiy geschrieben: > On 03.11.23 18:56, Markus Armbruster wrote: > > Kevin Wolf writes: > > > > > Am 03.11.2023 um 10:36 hat Markus Armbruster geschrieben: > > > > Vladimir Sementsov-Ogievskiy writes: > &g

Re: [PATCH] qapi: Craft the BlockdevCreateOptionsLUKS comment

2024-02-28 Thread Kevin Wolf
Am 28.02.2024 um 12:30 hat Daniel P. Berrangé geschrieben: > On Wed, Feb 28, 2024 at 11:17:37AM +0100, Kevin Wolf wrote: > > Until now, @size has been mandatory for creating images with every > > driver. Maybe we should even have put it into BlockdevCreateOptions's > > base, b

Re: [PATCH] qapi: Craft the BlockdevCreateOptionsLUKS comment

2024-02-28 Thread Kevin Wolf
Am 28.02.2024 um 11:23 hat Daniel P. Berrangé geschrieben: > On Wed, Feb 28, 2024 at 11:17:37AM +0100, Kevin Wolf wrote: > > Am 28.02.2024 um 07:43 hat Markus Armbruster geschrieben: > > > Yong Huang writes: > > > > > > > On Wed, Feb 21, 2024 at 4:

Re: [PATCH] qapi: Craft the BlockdevCreateOptionsLUKS comment

2024-02-28 Thread Kevin Wolf
Am 28.02.2024 um 07:43 hat Markus Armbruster geschrieben: > Yong Huang writes: > > > On Wed, Feb 21, 2024 at 4:26 PM Markus Armbruster wrote: > > > >> Yong Huang writes: > >> > >> > On Wed, Feb 21, 2024 at 2:43 PM Markus Armbruster > >> wrote: > >> > > >> >> Hyman Huang writes: > >> >> > >>

Re: [PATCH v6 01/15] hw/nvme: Use pcie_sriov_num_vfs()

2024-02-20 Thread Kevin Wolf
Am 20.02.2024 um 15:29 hat Kevin Wolf geschrieben: > Am 20.02.2024 um 13:24 hat Akihiko Odaki geschrieben: > > nvme_sriov_pre_write_ctrl() used to directly inspect SR-IOV > > configurations to know the number of VFs being disabled due to SR-IOV > > configuration writes, but

Re: [PATCH v6 01/15] hw/nvme: Use pcie_sriov_num_vfs()

2024-02-20 Thread Kevin Wolf
Am 20.02.2024 um 13:24 hat Akihiko Odaki geschrieben: > nvme_sriov_pre_write_ctrl() used to directly inspect SR-IOV > configurations to know the number of VFs being disabled due to SR-IOV > configuration writes, but the logic was flawed and resulted in > out-of-bound memory access. > > It assumed

[PATCH] iotests: Make 144 deterministic again

2024-02-09 Thread Kevin Wolf
-/issues/2126 Signed-off-by: Kevin Wolf --- tests/qemu-iotests/144 | 12 +++- tests/qemu-iotests/144.out | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/144 b/tests/qemu-iotests/144 index bdcc498fa2..d284a0e442 100755 --- a/tests/qemu-iotests/

Re: [RFC/INCOMPLETE PATCH 0/8] Attempt to make qemu-img options consistent and --help working

2024-02-09 Thread Kevin Wolf
Am 07.02.2024 um 18:58 hat Michael Tokarev geschrieben: > This is an incomplete first attempt only, there's a lot left to do. > > All the options in qemu-img is a complete mess, - no, inconsistent or > incomplete syntax in documentation, many undocumented options, option > names are used

Re: [PATCH] iothread: Simplify expression in qemu_in_iothread()

2024-02-08 Thread Kevin Wolf
Am 08.02.2024 um 11:48 hat Philippe Mathieu-Daudé geschrieben: > On 8/2/24 11:16, Kevin Wolf wrote: > > 'a == b ? false : true' is a rather convoluted way of writing 'a != b'. > > Use the more obvious way to write it. > > > > Signed-off-by: Kevin Wolf > > ---

[PATCH] iothread: Simplify expression in qemu_in_iothread()

2024-02-08 Thread Kevin Wolf
'a == b ? false : true' is a rather convoluted way of writing 'a != b'. Use the more obvious way to write it. Signed-off-by: Kevin Wolf --- iothread.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/iothread.c b/iothread.c index 6c1fc8c856..e1e9e04736 100644

Re: [PULL 1/1] virtio-blk: avoid using ioeventfd state in irqfd conditional

2024-02-08 Thread Kevin Wolf
Am 08.02.2024 um 06:37 hat Michael Tokarev geschrieben: > 06.02.2024 18:31, Stefan Hajnoczi : > > Requests that complete in an IOThread use irqfd to notify the guest > > while requests that complete in the main loop thread use the traditional > > qdev irq code path. The reason for this conditional

Re: [PULL 0/1] Block patches

2024-02-07 Thread Kevin Wolf
Am 06.02.2024 um 16:31 hat Stefan Hajnoczi geschrieben: > The following changes since commit 39a6e4f87e7b75a45b08d6dc8b8b7c2954c87440: > > Merge tag 'pull-qapi-2024-02-03' of https://repo.or.cz/qemu/armbru into > staging (2024-02-03 13:31:58 +) > > are available in the Git repository at:

[PULL 03/16] virtio-blk: add vq_rq[] bounds check in virtio_blk_dma_restart_cb()

2024-02-07 Thread Kevin Wolf
nna Czenczek Signed-off-by: Stefan Hajnoczi Message-ID: <20240206190610.107963-4-stefa...@redhat.com> Reviewed-by: Kevin Wolf Reviewed-by: Michael S. Tsirkin Signed-off-by: Kevin Wolf --- hw/block/virtio-blk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/block/virtio-blk.c

[PULL 06/16] block-backend: Allow concurrent context changes

2024-02-07 Thread Kevin Wolf
the assertion to that effect. In addition, because the context can be set and queried from different threads concurrently, it has to be accessed with atomic operations. Buglink: https://issues.redhat.com/browse/RHEL-19381 Suggested-by: Kevin Wolf Signed-off-by: Hanna Czenczek Message-ID

[PULL 11/16] scsi: Don't ignore most usb-storage properties

2024-02-07 Thread Kevin Wolf
or discard_granularity. Buglink: https://issues.redhat.com/browse/RHEL-22375 Signed-off-by: Kevin Wolf Message-ID: <20240131130607.24117-1-kw...@redhat.com> Signed-off-by: Kevin Wolf --- include/hw/scsi/scsi.h | 5 + hw/scsi/scsi-bus.c | 33 + hw/u

  1   2   3   4   5   6   7   8   9   10   >