Re: [PATCH v3 07/10] block: Implement bdrv_{pread, pwrite, pwrite_zeroes}() using generated_co_wrapper

2022-06-06 Thread Alberto Faria
Thanks for the feedback, and apologies for the delayed response. On Mon, May 30, 2022 at 1:49 PM Stefan Hajnoczi wrote: > If you find it's safe to change to -EINVAL then that's consistent with > how file I/O syscalls work and I think it would be nice. Switching to -EINVAL on negative bytes sound

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

2022-06-06 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-06 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

Re: [PATCH v6 5/8] libvduse: Add VDUSE (vDPA Device in Userspace) library

2022-06-06 Thread Yongji Xie
On Fri, Jun 3, 2022 at 7:25 PM Maxime Coquelin wrote: > > Hi Yongji, > > On 5/23/22 10:46, Xie Yongji wrote: > > VDUSE [1] is a linux framework that makes it possible to implement > > software-emulated vDPA devices in userspace. This adds a library > > as a subproject to help implementing VDUSE ba

Re: [PATCH v2] vduse-blk: Add name option

2022-06-06 Thread Yongji Xie
On Mon, Jun 6, 2022 at 7:05 PM Stefan Hajnoczi wrote: > > On Wed, Jun 01, 2022 at 09:10:58PM +0800, Yongji Xie wrote: > > On Wed, Jun 1, 2022 at 9:03 PM Stefan Hajnoczi wrote: > > > > > > On Tue, May 31, 2022 at 05:52:21PM +0800, Xie Yongji wrote: > > > > Currently we use 'id' option as the name

Re: [PATCH v2] vduse-blk: Add name option

2022-06-06 Thread Stefan Hajnoczi
On Wed, Jun 01, 2022 at 09:10:58PM +0800, Yongji Xie wrote: > On Wed, Jun 1, 2022 at 9:03 PM Stefan Hajnoczi wrote: > > > > On Tue, May 31, 2022 at 05:52:21PM +0800, Xie Yongji wrote: > > > Currently we use 'id' option as the name of VDUSE device. > > > It's a bit confusing since we use one value

[PATCH v2 08/11] iotests: drop some extra ** in qmp() call

2022-06-06 Thread Vladimir Sementsov-Ogievskiy
qmp() method supports passing dict (if it doesn't need substituting '_' to '-' in keys). So, drop some extra '**' operators. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/040| 4 +- tests/qemu-iotests/041| 14 +++--- tests/qem

[PATCH v2 09/11] iotests.py: pause_job(): drop return value

2022-06-06 Thread Vladimir Sementsov-Ogievskiy
The returned value is unused. It's simple to check by command git grep -B 3 '\.pause_job(' Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iote

[PATCH v2 07/11] iotests: drop some occasional semicolons

2022-06-06 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/041 | 2 +- tests/qemu-iotests/196 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041 index 4d7a829b65..550e4dc391 100755 --- a/tests/qemu-iotests/041 +++ b/tests

[PATCH v2 05/11] iotests: add some missed checks of qmp result

2022-06-06 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/041| 1 + tests/qemu-iotests/151| 1 + tests/qemu-iotests/152| 2 ++ tests/qemu-iotests/tests/migrate-bitmaps-test | 2 ++ 4 files changed, 6 insertions(+) d

[PATCH v2 10/11] tests/vm/basevm.py: use cmd() instead of qmp()

2022-06-06 Thread Vladimir Sementsov-Ogievskiy
We don't expect failure here and need 'result' object. cmd() is better in this case. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/vm/basevm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 254e11c932..dfb6307aaf 100

[PATCH v2 04/11] iotests: QemuStorageDaemon: add cmd() method like in QEMUMachine.

2022-06-06 Thread Vladimir Sementsov-Ogievskiy
Add similar method for consistency. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 4 1 file changed, 4 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index c69b10ac82..dd08cd8a2b 100644 --- a/tests/qemu-iotests/iot

[PATCH v2 02/11] python/qemu: rename command() to cmd()

2022-06-06 Thread Vladimir Sementsov-Ogievskiy
Use a shorter name. We are going to move in iotests from qmp() to command() where possible. But command() is longer than qmp() and don't look better. Let's rename. You can simply grep for '\.command(' and for 'def command(' to check that everything is updated (command() in tests/docker/docker.py i

[PATCH v2 03/11] python/machine.py: upgrade vm.cmd() method

2022-06-06 Thread Vladimir Sementsov-Ogievskiy
The method is not popular in iotests, we prefer use vm.qmp() and then check success by hand.. But that's not optimal. To simplify movement to vm.cmd() let's support same interface improvements like in vm.qmp(). Signed-off-by: Vladimir Sementsov-Ogievskiy --- python/qemu/machine/machine.py | 12 +

[PATCH v2 00/11] iotests: use vm.cmd()

2022-06-06 Thread Vladimir Sementsov-Ogievskiy
Hi all! Let's get rid of pattern result = self.vm.qmp(...) self.assert_qmp(result, 'return', {}) And switch to just self.vm.cmd(...) Supersedes: <20220408170214.45585-1-vsement...@openvz.org> ([RFC 0/2] introduce QEMUMachind.cmd()) Vladimir Sementsov-Ogievskiy (11): python: r

[PATCH v2 06/11] iotests: refactor some common qmp result checks into generic pattern

2022-06-06 Thread Vladimir Sementsov-Ogievskiy
To simplify further conversion. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/040 | 3 ++- tests/qemu-iotests/147 | 3 ++- tests/qemu-iotests/155 | 4 ++-- tests/qemu-iotests/218 | 4 ++-- tests/qemu-iotests/296 | 3 ++- 5 files changed, 10 insertions(+), 7 deletions(-) dif

[PATCH v2 01/11] python: rename QEMUMonitorProtocol.cmd() to cmd_raw()

2022-06-06 Thread Vladimir Sementsov-Ogievskiy
Having cmd() and command() methods in one class doesn't look good. Rename cmd() to cmd_raw(), to show its meaning better. We also want to rename command() to cmd() in future, so this commit is a necessary first step. Keep new cmd_raw() only in a few places where it's really needed and move to com