From: Vladimir Sementsov-Ogievskiy
We are going to add more block-graph modifying transaction actions,
and block-graph modifying functions are already based on Transaction
API.
Next, we'll need to separately update permissions after several
graph-modifying actions, and this would be simple
From: Vladimir Sementsov-Ogievskiy
Look at qmp_transaction(): dev_list is not obvious name for list of
actions. Let's look at qapi spec, this argument is "actions". Let's
follow the common practice of using same argument names in qapi scheme
and code.
To be honest, rename props to
Hi all!
v7: fixed my email, sorry for the noise.
That's a next portion of old good
"[PATCH v5 00/45] Transactional block-graph modifying API", rebased to
master.
Now, refactor QMP transactions implementation into new (relatively)
transaction API.
Vladimir Sementsov-Ogievskiy (5):
From: Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
blockdev.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 2174ab2694..89c573a094 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2375,7 +2375,7 @@ void
From: Vladimir Sementsov-Ogievskiy
Look at qmp_transaction(): dev_list is not obvious name for list of
actions. Let's look at qapi spec, this argument is "actions". Let's
follow the common practice of using same argument names in qapi scheme
and code.
To be honest, rename props to
From: Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
blockdev.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 2174ab2694..89c573a094 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2375,7 +2375,7 @@ void
From: Vladimir Sementsov-Ogievskiy
We are going to add more block-graph modifying transaction actions,
and block-graph modifying functions are already based on Transaction
API.
Next, we'll need to separately update permissions after several
graph-modifying actions, and this would be simple
From: Vladimir Sementsov-Ogievskiy
Let's simplify things:
First, actions generally don't need access to common BlkActionState
structure. The only exclusion are backup actions that need
block_job_txn.
Next, for transaction actions of Transaction API is more native to
allocated state structure
From: Vladimir Sementsov-Ogievskiy
Only backup supports GROUPED mode. Make this logic more clear. And
avoid passing extra thing to each action.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
blockdev.c | 92 +++---
1 file changed, 19 insertions
Hi all!
That's a next portion of old good
"[PATCH v5 00/45] Transactional block-graph modifying API", rebased to
master.
Now, refactor QMP transactions implementation into new (relatively)
transaction API.
Vladimir Sementsov-Ogievskiy (5):
blockdev: refactor transaction to use Trans
On 20.02.23 18:18, John Maline wrote:
As a qemu newcomer I had a related question and confusion from reading existing
docs. Searching qemu-block, this seemed related to my question so I’ll ask…
On Mar 15, 2022, at 12:57 PM, Vladimir Sementsov-Ogievskiy
wrote:
Hi all!
Here I want
On 15.02.23 16:07, Markus Armbruster wrote:
Kevin Wolf writes:
Am 13.01.2023 um 08:30 hat Markus Armbruster geschrieben:
Drive-by comment...
Kevin Wolf writes:
This series addresses the problem described in these bug reports:
https://gitlab.com/qemu-project/qemu/-/issues/1330
(trace_vfio_state_pending,
trace_migrate_pending_estimate, trace_migrate_pending_exact)
should be changed correspondingly.
with or without:
Reviewed-by: Vladimir Sementsov-Ogievskiy
--
Best regards,
Vladimir
On 15.02.23 20:03, Juan Quintela wrote:
So remove last assignation of res_compatible.
Signed-off-by: Juan Quintela
Reviewed-by: Vladimir Sementsov-Ogievskiy
--
Best regards,
Vladimir
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
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
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
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
Here we don't expect a failure. In case on failure we'll crash on
trying to access ['return']. Let's better use .command() that clearly
raise on failure.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
scripts/cpu-x86-uarch-abi.py | 12 ++--
1 file changed, 6 insertions(+), 6 deletions
Add similar method for consistency.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/iotests.py | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 675fbaa1c3..8ef1c8a5d2 100644
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 step.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
python/qemu/machine/machine.py | 2
We just want to ignore failure, so we don't need low level .cmd(). This
helps further renaming .command() to .cmd().
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
python/qemu/qmp/qmp_shell.py | 20 ++--
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/python/qemu
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 23229e23d1..e61f9f0fd1
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
The argument is unused, let's drop it for now, as we are going to
refactor the interface and don't want to refactor unused things.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
python/qemu/qmp/legacy.py | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/python/qemu/qmp
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
is
unrelated).
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Daniel P. Berrangé
---
docs/devel/testing.rst| 10 +-
python/qemu/machine/machine.py| 8 +-
python/qemu/qmp/legacy.py | 2 +-
python/qemu/qmp/qmp_shell.py
Now make check-dev called in python/ directory fails due to this error.
Let's fix it.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
python/qemu/qmp/protocol.py| 2 +-
python/qemu/qmp/qmp_client.py | 2 +-
tests/qemu-iotests/tests/migrate
Now 'make check-dev' called in python/ directory raises several
W0719: Raising too general exception: Exception (broad-exception-raised)
Let's fix.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
python/qemu/utils/qemu_ga_client.py | 6 +++---
tests/qemu-iotests/iotests.py | 4 ++--
2
Hi all!
Let's get rid of pattern
result = self.vm.qmp(...)
self.assert_qmp(result, 'return', {})
And switch to just
self.vm.cmd(...)
v5:
- include fixups by John
- fix 'make check-dev'
- split first patch into several [Daniel]
Vladimir Sementsov-Ogievskiy (16):
python: fix
On 15.02.23 14:29, Denis V. Lunev wrote:
On 2/14/23 18:44, Vladimir Sementsov-Ogievskiy wrote:
On 03.02.23 12:18, Alexander Ivanov wrote:
data_end field in BDRVParallelsState is set to the biggest offset present
in BAT. If this offset is outside of the image, any further write will
create
On 15.02.23 12:08, Juan Quintela wrote:
Vladimir Sementsov-Ogievskiy wrote:
On 08.02.23 16:57, Juan Quintela wrote:
So remove last assignation of res_compatible.
I hoped for some description when asked to split it out :)
Signed-off-by: Juan Quintela
---
migration/ram.c | 2 +-
1
On 13.01.23 14:29, Kevin Wolf wrote:
Another thing that could be tried is making failure in .bdrv_close less
likely by doing things earlier. At least ENOSPC could probably be
avoided if dirty bitmaps clusters were allocated during the write
request that first sets a bit in them (I know too
On 14.02.23 21:22, Juan Quintela wrote:
Vladimir Sementsov-Ogievskiy wrote:
On 08.02.23 16:57, Juan Quintela wrote:
Once that res_compatible is removed, they don't make sense anymore.
Signed-off-by: Juan Quintela
---
include/migration/register.h | 18 --
migration
I have to admit this is out of my scope now. Still feel free to Cc me
directly if my help is needed :)
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
MAINTAINERS | 2 --
1 file changed, 2 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 96e25f62ac..12bc96f52a 100644
--- a/MAINTAINERS
On 03.02.23 12:18, Alexander Ivanov wrote:
Don't let high_off be more than the file size even if we don't fix the
image.
Signed-off-by: Alexander Ivanov
Reviewed-by: Denis V. Lunev
Reviewed-by: Vladimir Sementsov-Ogievskiy
--
Best regards,
Vladimir
On 03.02.23 12:18, Alexander Ivanov wrote:
data_end field in BDRVParallelsState is set to the biggest offset present
in BAT. If this offset is outside of the image, any further write will
create the cluster at this offset and/or the image will be truncated to
this offset on close. This is
tatus()")
Ohh :/
Signed-off-by: Andrey Zhadchenko
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
include/qemu/hbitmap.h | 2 +-
util/hbitmap.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/qemu/hbitmap.h b/include/qemu/hbitmap.h
index
On 14.02.23 17:29, Fiona Ebner wrote:
[..]
[0]: Is there a good way to peek the iterator without doing something
like the following (we do know the offset from last time in
mirror_iteration(), so that is not an issue)?
offset_from_last_time = bdrv_dirty_iter_next(s->dbi);
...other stuff...
On 02.02.23 16:27, Fiona Ebner wrote:
Am 02.02.23 um 12:34 schrieb Kevin Wolf:
Am 02.02.2023 um 11:19 hat Fiona Ebner geschrieben:
Am 31.01.23 um 19:18 schrieb Denis V. Lunev:
Frankly speaking I would say that this switch could be considered
NOT QEMU job and we should just send a notification
On 02.02.23 18:23, Kevin Wolf wrote:
Am 02.02.2023 um 14:35 hat Denis V. Lunev geschrieben:
On 2/2/23 14:27, Fiona Ebner wrote:
Am 02.02.23 um 12:34 schrieb Kevin Wolf:
Am 02.02.2023 um 11:19 hat Fiona Ebner geschrieben:
Am 31.01.23 um 19:18 schrieb Denis V. Lunev:
Frankly speaking I would
On 08.02.23 16:57, Juan Quintela wrote:
Once that res_compatible is removed, they don't make sense anymore.
Signed-off-by: Juan Quintela
---
include/migration/register.h | 18 --
migration/savevm.h | 8
hw/s390x/s390-stattrib.c | 7 +++
ize = pend_pre + pend_compat + pend_post;
+qemu_savevm_state_pending_estimate(_pre, _post);
+uint64_t pending_size = pend_pre + pend_post;
Mixed declarations are "gnerally not allowed" by devel/style.rst.. Preexisting,
but we may fix it now.
Anyway:
Reviewed-by: Vladimir Sement
On 09.02.23 21:10, Juan Quintela wrote:
Vladimir Sementsov-Ogievskiy wrote:
On 08.02.23 16:57, Juan Quintela wrote:
So remove last assignation of res_compatible.
I hoped for some description when asked to split it out :)
Signed-off-by: Juan Quintela
---
migration/ram.c | 2 +-
1
above.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Hanna Reitz
CC: Vladimir Sementsov-Ogievskiy
Reviewed-by: Vladimir Sementsov-Ogievskiy
--
Best regards,
Vladimir
On 08.02.23 16:57, Juan Quintela wrote:
So remove last assignation of res_compatible.
I hoped for some description when asked to split it out :)
Signed-off-by: Juan Quintela
---
migration/ram.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/migration/ram.c
+ Den
Den, I remember we thought about that, and probably had a solution?
Another possible approach to get benefits from both modes is to switch to
blocking mode after first loop of copying. [*]
Hmm. Thinking about proposed solution it seems, that [*] is better. The main reason of
On 30.01.23 11:03, Juan Quintela wrote:
Signed-off-by: Juan Quintela
Reviewed-by: Dr. David Alan Gilbert
---
migration/migration.c | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index
On 1/30/23 11:06, Juan Quintela wrote:
It was only used for RAM, and in that case, it means that this amount
of data was sent for memory. Just delete the field in all callers.
Could you describe, why it's safe to change the behavior for RAM?
Also, I think it would be a lot better to split
On 1/10/23 13:49, Daniel P. Berrangé wrote:
On Tue, Jan 10, 2023 at 11:37:48AM +0300, Vladimir Sementsov-Ogievskiy wrote:
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
On 7/12/22 00:21, John Snow wrote:
On Mon, Jul 11, 2022 at 5:16 PM John Snow wrote:
On Fri, Jun 24, 2022 at 3:53 PM Vladimir Sementsov-Ogievskiy
wrote:
I've spent much time trying to debug hanging pipeline in gitlab. I
started from and idea that I have problem in code in my series (which
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
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 2276364c42..ff7e4fea15
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
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
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
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
to command() where possible.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
python/qemu/machine/machine.py | 2 +-
python/qemu/qmp/legacy.py | 8 ++--
python/qemu/qmp/qmp_shell.py | 13 +++--
scripts/cpu-x86-uarch-abi.py | 12 ++--
tests/qemu-iotests/iotests.py | 2
Oops, no qemu-devel in CC. Sorry. Will resend
--
Best regards,
Vladimir
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
to command() where possible.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
python/qemu/machine/machine.py | 2 +-
python/qemu/qmp/legacy.py | 8 ++--
python/qemu/qmp/qmp_shell.py | 13 +++--
scripts/cpu-x86-uarch-abi.py | 12 ++--
tests/qemu-iotests/iotests.py | 2
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
Hi all!
Let's get rid of pattern
result = self.vm.qmp(...)
self.assert_qmp(result, 'return', {})
And switch to just
self.vm.cmd(...)
v3: rebase on master, fix some over-80 lines
Vladimir Sementsov-Ogievskiy (11):
python: rename QEMUMonitorProtocol.cmd() to cmd_raw()
python
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
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 2276364c42..ff7e4fea15
Hi all!
Let's get rid of pattern
result = self.vm.qmp(...)
self.assert_qmp(result, 'return', {})
And switch to just
self.vm.cmd(...)
v4: resend to fix CC
v3: rebase on master, fix some over-80 lines
Vladimir Sementsov-Ogievskiy (11):
python: rename QEMUMonitorProtocol.cmd
is
unrelated).
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
docs/devel/testing.rst| 10 +-
python/qemu/machine/machine.py| 8 +-
python/qemu/qmp/legacy.py | 2 +-
python/qemu/qmp/qmp_shell.py | 2 +-
python/qemu/utils
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
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
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
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
is
unrelated).
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
docs/devel/testing.rst| 10 +-
python/qemu/machine/machine.py| 8 +-
python/qemu/qmp/legacy.py | 2 +-
python/qemu/qmp/qmp_shell.py | 2 +-
python/qemu/utils
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
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
On 11/15/22 01:46, Eric Blake wrote:
Add a new negotiation feature where the client and server agree to use
larger packet headers on every packet sent during transmission phase.
This has two purposes: first, it makes it possible to perform
operations like trim, write zeroes, and block status on
On 11/15/22 01:46, Eric Blake wrote:
Commit 9f30fedb improved the spec to allow non-payload requests that
exceed any advertised maximum block size. Take this one step further
by permitting the server to use NBD_EOVERFLOW as a hint to the client
when a request is oversize (while permitting
addition of 64-bit
requests, where a client's request is no longer bounded to 4G and
could thereby produce even more than 8M extents for the corner case
when every 512 bytes is a new extent, if it were not for this
recommendation.
s-o-b line missed.
Reviewed-by: Vladimir Sementsov-Ogievskiy
On 12/13/22 11:53, Kevin Wolf wrote:
diff --git a/block/blkdebug.c b/block/blkdebug.c
index 4265ca125e..d8e199d59c 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -1076,7 +1076,7 @@ static BlockDriver bdrv_blkdebug = {
.bdrv_reopen_prepare= blkdebug_reopen_prepare,
On 12/13/22 11:53, Kevin Wolf wrote:
From: Emanuele Giuseppe Esposito
In some places we are sure we are always running in a
coroutine, therefore it's useless to call the generated_co_wrapper,
instead call directly the _co_ function.
Signed-off-by: Emanuele Giuseppe Esposito
Signed-off-by:
and the reasoning, but the change looks like a degradation.. bdrv_*
functions becomes kind of *_locked() ? If we are going to introduce a lot of
such changes, that's not good. But this one is not a problem of course.
Reviewed-by: Vladimir Sementsov-Ogievskiy
if (len
On 12/13/22 11:53, Kevin Wolf wrote:
--- a/include/block/block_int-common.h
+++ b/include/block/block_int-common.h
@@ -684,7 +684,7 @@ struct BlockDriver {
int coroutine_fn (*bdrv_co_truncate)(BlockDriverState *bs, int64_t offset,
bool exact,
Esposito
Signed-off-by: Kevin Wolf
Reviewed-by: Vladimir Sementsov-Ogievskiy
--
Best regards,
Vladimir
On 12/13/22 11:53, Kevin Wolf wrote:
--- a/include/block/block_int-common.h
+++ b/include/block/block_int-common.h
@@ -729,7 +729,7 @@ struct BlockDriver {
void (*bdrv_debug_event)(BlockDriverState *bs, BlkdebugEvent event);
/* io queue for linux-aio */
-void
lug)(BlockDriverState *bs);
don't we want to rename it to _co_ too?
anyway:
Reviewed-by: Vladimir Sementsov-Ogievskiy
--
Best regards,
Vladimir
On 12/13/22 11:53, Kevin Wolf wrote:
From: Emanuele Giuseppe Esposito
Just omit the various 'return' when the return type is void.
Signed-off-by: Emanuele Giuseppe Esposito
Signed-off-by: Kevin Wolf
Reviewed-by: Vladimir Sementsov-Ogievskiy
--
Best regards,
Vladimir
) /* Defines nbd_read16(). */
| ^~
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Vladimir Sementsov-Ogievskiy
--
Best regards,
Vladimir
be removed, and function creation can be offloaded to
c_w.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Kevin Wolf
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
block/dirty-bitmap.c | 88 +---
block/meson.build| 1 +
include
-by: Kevin Wolf
Reviewed-by: Vladimir Sementsov-Ogievskiy
(if you merge 07 here, keep my r-b)
--
Best regards,
Vladimir
per-function
custom "ret" field.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Kevin Wolf
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
block/block-gen.h | 5 +
scripts/block-coroutine-wrapper.py | 19 +++
2 files changed, 12 inse
-by: Vladimir Sementsov-Ogievskiy
--
Best regards,
Vladimir
er_mixed()
+name = func.co_name
+struct_name = func.struct_name
+return f"""\
+int {func.name}({ func.gen_list('{decl}') })
+{{
[..]
def gen_wrappers(input_code: str) -> str:
With at least comments for new functions turned into doc-strings:
Reviewed-by: Vladimir Sementsov-Ogievskiy
--
Best regards,
Vladimir
On 11/25/22 16:35, Emanuele Giuseppe Esposito wrote:
In preparation to the incoming new function specifiers,
rename g_c_w with a more meaningful name and document it.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
--
Best regards,
Vladimir
On 11/25/22 16:35, Emanuele Giuseppe Esposito wrote:
It is always called in coroutine_fn callbacks, therefore
it can directly call bdrv_co_create().
Rename it to bdrv_co_create_file too.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Kevin Wolf
Reviewed-by: Vladimir Sementsov
cal_err);
-cco->ret = ret;
+cco->ret = bdrv_co_create(cco->drv, cco->filename, cco->opts, >err);
We need aio_wait_kick() call here, like in other co_entry() functions.
Otherwise we may stuck in aio_poll()
with it:
Reviewed-by: Vladimir Sementsov-Ogievskiy
Hmm actu
wed-by: Kevin Wolf
Reviewed-by: Vladimir Sementsov-Ogievskiy
--
Best regards,
Vladimir
-by: Vladimir Sementsov-Ogievskiy
--
Best regards,
Vladimir
and is marked as coroutine_fn, call
directly bdrv_co_common_block_status_above() to avoid using a g_c_w.
Same applies to blk_co_is_allocated_above.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
--
Best regards,
Vladimir
ed-by: Paolo Bonzini
Reviewed-by: Vladimir Sementsov-Ogievskiy
--
Best regards,
Vladimir
ine_fn"s.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Paolo Bonzini
Reviewed-by: Kevin Wolf
change is OK:
Reviewed-by: Vladimir Sementsov-Ogievskiy
--
Best regards,
Vladimir
e from non-coroutine
case in g_c_w, create duplicate wrappers that take care of directly
calling the same coroutine functions called in the g_c_w.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Kevin Wolf
Reviewed-by: Vladimir Sementsov-Ogievskiy
--
Best regards,
Vladimir
401 - 500 of 9398 matches
Mail list logo