Re: [PATCH v5 21/45] block: add bdrv_try_set_aio_context_tran transaction action

2022-06-13 Thread Hanna Reitz
On 09.06.22 16:56, Vladimir Sementsov-Ogievskiy wrote: On 6/8/22 14:49, Hanna Reitz wrote: On 30.03.22 23:28, Vladimir Sementsov-Ogievskiy wrote: To be used in further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   block.c | 48   1 f

Re: [PATCH v5 21/45] block: add bdrv_try_set_aio_context_tran transaction action

2022-06-13 Thread Hanna Reitz
On 30.03.22 23:28, Vladimir Sementsov-Ogievskiy wrote: To be used in further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 48 1 file changed, 48 insertions(+) diff --git a/block.c b/block.c index be19964f89..1900cdf277 10

Re: [PATCH v5 22/45] block: implemet bdrv_unref_tran()

2022-06-13 Thread Hanna Reitz
On 30.03.22 23:28, Vladimir Sementsov-Ogievskiy wrote: Now nodes are removed during block-graph update transactions now? Look at bdrv_replace_child_tran: bdrv_unref() is simply postponed to commit phase. What is the problem with it? We want to make copy-before-write permissions strict: it shoul

Re: [RFC v1] Adding block layer APIs resembling Linux ZoneBlockDevice ioctls.

2022-06-13 Thread Sam Li
Damien Le Moal 于2022年6月13日周一 14:24写道: > > On 6/13/22 13:09, Sam Li wrote: > > By adding zone management operations in BlockDriver, storage > > controller emulation can use the new block layer APIs including > > zone_report, zone_reset, zone_open, zone_close, and zone_finish. > > Like a real review

Re: [RFC v1] Adding block layer APIs resembling Linux ZoneBlockDevice ioctls.

2022-06-13 Thread Damien Le Moal
On 6/13/22 18:12, Sam Li wrote: [...] >>> +}; >>> + >>> +/** >>> + * Zone device information data structure. >>> + * Provide information on a device. >>> + */ >>> +typedef struct zbd_dev { >>> +enum zone_model model; >>> +uint32_t block_size; >>> +uint32_t write_granularity; >>> +ui

Re: [PATCH v5 29/45] block: introduce BDRV_O_NOPERM flag

2022-06-13 Thread Hanna Reitz
On 30.03.22 23:28, Vladimir Sementsov-Ogievskiy wrote: Now copy-before-write filter has weak permission model: when it has no parents, it share write permission on source. Otherwise we just can't blockdev-add it, when existing user of source has write permission. The situation is bad, it means t

Re: [PATCH 1/1] block: use 'unsigned' for in_flight field on driver state

2022-06-13 Thread Denis V. Lunev
On 30.05.2022 12:39, Denis V. Lunev wrote: This patch makes in_flight field 'unsigned' for BDRVNBDState and MirrorBlockJob. This matches the definition of this field on BDS and is generically correct - we should never get negative value here. Signed-off-by: Denis V. Lunev CC: John Snow CC: Vla

Re: [PATCH v2 1/1] nbd: trace long NBD operations

2022-06-13 Thread Denis V. Lunev
On 30.05.2022 12:39, Denis V. Lunev wrote: At the moment there are 2 sources of lengthy operations if configured: * open connection, which could retry inside and * reconnect of already opened connection These operations could be quite lengthy and cumbersome to catch thus it would be quite natural

[PATCH 0/5] Some fixes and improvements for vduse-blk

2022-06-13 Thread Xie Yongji
This series includes few fixes and improvements for the vduse-blk export. Patch 1 fixes resources leak when vduse fd is zero. Patch 2, 3 fixes two bugs which could be triggered by force deleting a vduse-blk export with high I/O loads. Patch 4, 5 adds two new options for vduse-blk export. Xie Yo

[PATCH 4/5] vduse-blk: Add serial option

2022-06-13 Thread Xie Yongji
Add a 'serial' option to allow user to specify this value explicitly. And the default value is changed to an empty string as what we did in "hw/block/virtio-blk.c". Signed-off-by: Xie Yongji --- block/export/vduse-blk.c | 20 ++-- block/export/vhost-user-blk-server.c

[PATCH 1/5] libvduse: Fix resources leak in vduse_dev_destroy()

2022-06-13 Thread Xie Yongji
This fixes resource leak when the fd is zero in vduse_dev_destroy(). Fixes: 8dbd281c1675 ("libvduse: Add VDUSE (vDPA Device in Userspace) library") Signed-off-by: Xie Yongji --- subprojects/libvduse/libvduse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/li

[PATCH 2/5] vduse-blk: Don't unlink the reconnect file if device exists

2022-06-13 Thread Xie Yongji
We should not unlink the reconnect file if vduse_dev_destroy() fails with -EBUSY which means the VDUSE device has not been removed from the vDPA bus. Otherwise, we might fail on the reconnection later. Fixes: 730abef0e873 ("libvduse: Add support for reconnecting") Signed-off-by: Xie Yongji --- b

[PATCH 3/5] vduse-blk: Don't delete the export until all inflight I/Os completed

2022-06-13 Thread Xie Yongji
Don't delete the export until all inflight I/Os completed. Otherwise, it might lead to a use-after-free. Fixes: cc241b5505b2 ("vduse-blk: Implement vduse-blk export") Signed-off-by: Xie Yongji --- block/export/vduse-blk.c | 22 ++ 1 file changed, 22 insertions(+) diff --git

[PATCH 5/5] vduse-blk: Add name option

2022-06-13 Thread Xie Yongji
Currently we use 'id' option as the name of VDUSE device. It's a bit confusing since we use one value for two different purposes: the ID to identfy the export within QEMU (must be distinct from any other exports in the same QEMU process, but can overlap with names used by other processes), and the

Re: [PATCH v14 5/8] qmp: decode feature & status bits in virtio-status

2022-06-13 Thread Jonah Palmer
On 6/10/22 01:41, Michael S. Tsirkin wrote: On Thu, May 19, 2022 at 02:30:43AM -0400, Jonah Palmer wrote: On 5/16/22 16:26, Michael S. Tsirkin wrote: On Fri, Apr 01, 2022 at 09:23:22AM -0400, Jonah Palmer wrote: From: Laurent Vivier Display feature names instead of bit

Re: [PULL 00/18] Block layer patches

2022-06-13 Thread Kevin Wolf
Am 09.06.2022 um 22:18 hat Richard Henderson geschrieben: > On 6/9/22 10:21, Kevin Wolf wrote: > > The following changes since commit 028f2361d0c2d28d6f918fe618f389228ac22b60: > > > >Merge tag 'pull-target-arm-20220609' of > > https://git.linaro.org/people/pmaydell/qemu-arm into staging (2022

Re: [External] [PATCH v13 3/8] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-06-13 Thread Leonardo Bras Soares Passos
Hello Peter, On Wed, Jun 8, 2022 at 5:23 PM Peter Xu wrote: [...] > > In a previous iteration of the patchset, it was made clear that it's > > desirable to detect when the kernel falls back to copying mechanism, > > so the user of 'QIOChannelSocket' can switch to copying and avoid the > > overhea

Re: [External] [PATCH v13 3/8] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-06-13 Thread Peter Xu
On Mon, Jun 13, 2022 at 05:58:44PM -0300, Leonardo Bras Soares Passos wrote: > Hello Peter, > > On Wed, Jun 8, 2022 at 5:23 PM Peter Xu wrote: > [...] > > > In a previous iteration of the patchset, it was made clear that it's > > > desirable to detect when the kernel falls back to copying mechani

[PATCH 1/5] tests/qemu-iotests: hotfix for 307, 223 output

2022-06-13 Thread John Snow
Fixes: 58a6fdcc Signed-off-by: John Snow --- tests/qemu-iotests/223.out | 4 ++-- tests/qemu-iotests/307.out | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/223.out b/tests/qemu-iotests/223.out index 06479415312..26fb347c5da 100644 --- a/tests/qemu-iote

[PATCH 0/5] Update CentOS VM tests

2022-06-13 Thread John Snow
This patch series attempts to revive the CentOS VM test targets, because both appear to be presently non-functional. I didn't quite get it working 100%, but I'm sending anyway to ask for help in solving straggler problems. My experience testing these is that CentOS 8 (x86_64) fails on test-qga:

[PATCH 4/5] tests/vm: switch CentOS 8 to CentOS 8 Stream

2022-06-13 Thread John Snow
The old CentOS image didn't work anymore because it was already EOL at the beginning of 2022. Signed-off-by: John Snow --- tests/vm/centos | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/vm/centos b/tests/vm/centos index be4f6ff2f14..f5bbdecf62d 100755 --- a/tes

[PATCH 2/5] tests/qemu-iotests: skip 108 when FUSE is not loaded

2022-06-13 Thread John Snow
In certain container environments we may not have FUSE at all, so skip the test in this circumstance too. Signed-off-by: John Snow --- tests/qemu-iotests/108 | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/qemu-iotests/108 b/tests/qemu-iotests/108 index 9e923d6a59f..e401c5e9933 1

[PATCH 3/5] tests/vm: use 'cp' instead of 'ln' for temporary vm images

2022-06-13 Thread John Snow
If the initial setup fails, you've permanently altered the state of the downloaded image in an unknowable way. Use 'cp' like our other test setup scripts do. Signed-off-by: John Snow --- tests/vm/centos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vm/centos b/tests/v

Re: [External] [PATCH v13 3/8] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-06-13 Thread Leonardo Bras Soares Passos
On Mon, Jun 13, 2022 at 7:53 PM Peter Xu wrote: > > On Mon, Jun 13, 2022 at 05:58:44PM -0300, Leonardo Bras Soares Passos wrote: > > Hello Peter, > > > > On Wed, Jun 8, 2022 at 5:23 PM Peter Xu wrote: > > [...] > > > > In a previous iteration of the patchset, it was made clear that it's > > > > d

Re: [PATCH 4/5] tests/vm: switch CentOS 8 to CentOS 8 Stream

2022-06-13 Thread Thomas Huth
On 14/06/2022 03.50, John Snow wrote: The old CentOS image didn't work anymore because it was already EOL at the beginning of 2022. Signed-off-by: John Snow --- tests/vm/centos | 8 1 file changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Thomas Huth

Re: [PATCH 3/5] tests/vm: use 'cp' instead of 'ln' for temporary vm images

2022-06-13 Thread Thomas Huth
On 14/06/2022 03.50, John Snow wrote: If the initial setup fails, you've permanently altered the state of the downloaded image in an unknowable way. Use 'cp' like our other test setup scripts do. Signed-off-by: John Snow --- tests/vm/centos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

Re: [PATCH 2/5] tests/qemu-iotests: skip 108 when FUSE is not loaded

2022-06-13 Thread Thomas Huth
On 14/06/2022 03.50, John Snow wrote: In certain container environments we may not have FUSE at all, so skip the test in this circumstance too. Signed-off-by: John Snow --- tests/qemu-iotests/108 | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/qemu-iotests/108 b/tests/qemu-io

[PATCH v2 1/6] libvduse: Fix some compile errors with clang

2022-06-13 Thread Xie Yongji
This fixes some compile errors with clang: ../subprojects/libvduse/libvduse.c:578:20: error: unused function 'vring_used_flags_set_bit' [-Werror,-Wunused-function] static inline void vring_used_flags_set_bit(VduseVirtq *vq, int mask) ^ ../subprojects/libvduse/libvduse.c:587:20:

[PATCH v2 2/6] libvduse: Fix resources leak in vduse_dev_destroy()

2022-06-13 Thread Xie Yongji
This fixes resource leak when the fd is zero in vduse_dev_destroy(). Fixes: 8dbd281c1675 ("libvduse: Add VDUSE (vDPA Device in Userspace) library") Signed-off-by: Xie Yongji --- subprojects/libvduse/libvduse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/li

[PATCH v2 3/6] vduse-blk: Don't unlink the reconnect file if device exists

2022-06-13 Thread Xie Yongji
We should not unlink the reconnect file if vduse_dev_destroy() fails with -EBUSY which means the VDUSE device has not been removed from the vDPA bus. Otherwise, we might fail on the reconnection later. Fixes: 730abef0e873 ("libvduse: Add support for reconnecting") Signed-off-by: Xie Yongji --- b

[PATCH v2 5/6] vduse-blk: Add serial option

2022-06-13 Thread Xie Yongji
Add a 'serial' option to allow user to specify this value explicitly. And the default value is changed to an empty string as what we did in "hw/block/virtio-blk.c". Signed-off-by: Xie Yongji --- block/export/vduse-blk.c | 20 ++-- block/export/vhost-user-blk-server.c

[PATCH v2 0/6] Some fixes and improvements for vduse-blk

2022-06-13 Thread Xie Yongji
This series includes few fixes and improvements for the vduse-blk export. Patch 1 fixes some compile errors with clang in 32-bit machine. Patch 2 fixes resources leak when vduse fd is zero. Patch 3, 4 fixes two bugs which could be triggered by force deleting a vduse-blk export with high I/O load

[PATCH v2 4/6] vduse-blk: Don't delete the export until all inflight I/Os completed

2022-06-13 Thread Xie Yongji
Don't delete the export until all inflight I/Os completed. Otherwise, it might lead to a use-after-free. Fixes: cc241b5505b2 ("vduse-blk: Implement vduse-blk export") Signed-off-by: Xie Yongji --- block/export/vduse-blk.c | 22 ++ 1 file changed, 22 insertions(+) diff --git

[PATCH v2 6/6] vduse-blk: Add name option

2022-06-13 Thread Xie Yongji
Currently we use 'id' option as the name of VDUSE device. It's a bit confusing since we use one value for two different purposes: the ID to identfy the export within QEMU (must be distinct from any other exports in the same QEMU process, but can overlap with names used by other processes), and the

Re: Re: [PULL 00/18] Block layer patches

2022-06-13 Thread Yongji Xie
On Tue, Jun 14, 2022 at 1:04 AM Kevin Wolf wrote: > > Am 09.06.2022 um 22:18 hat Richard Henderson geschrieben: > > On 6/9/22 10:21, Kevin Wolf wrote: > > > The following changes since commit > > > 028f2361d0c2d28d6f918fe618f389228ac22b60: > > > > > >Merge tag 'pull-target-arm-20220609' of >

Re: [PATCH] qemu-iotests: Discard stderr when probing devices

2022-06-13 Thread Thomas Huth
On 05/06/2022 16.57, Cole Robinson wrote: ./configure --enable-modules --enable-smartcard \ --target-list=x86_64-softmmu,s390x-softmmu make cd build QEMU_PROG=`pwd`/s390x-softmmu/qemu-system-s390x \ ../tests/check-block.sh qcow2 ... --- /home/crobinso/src/qemu/tests/qemu-iotests/127.out