iotest 169 uses the 'new' module to add methods to a class. This module
no longer exists in Python 3. Instead, we can use a lambda. Best of
all, this works in 2.7 just as well.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/169 | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --
Python 3.2 introduced the inheritable attribute for FDs. At the same
time, it changed the default so that all FDs are not inheritable by
default, that only inheritable FDs are inherited to subprocesses, and
only if close_fds is explicitly set to False.
Adhere to this by setting close_fds to False
There are two imports that need to be modified when running the iotests
under Python 3: One is StringIO, which no longer exists; instead, the
StringIO class comes from the io module, so import it from there. The
other is the ConfigParser, which has just been renamed to configparser.
Signed-off-by
When dumping an object into the log, there are differences between
Python 2 and 3. First, unicode strings are prefixed by 'u' in Python 2
(they are no longer in 3, because unicode strings are the default
there). Second, the order of keys in dicts may differ. Third,
especially long numbers are lo
Hi all!
These series introduce backup-top driver. It's a filter-node, which
do copy-before-write operation. Mirror uses filter-node for handling
guest writes, let's move to filter-node (from write-notifiers) for
backup too (patch 16)
v4:
fixes, rewrite driver to be implicit, drop new interfaces a
Correctly rewrite default argument. After the patch, the function can
be used for other (not only default test-chosen) image format.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/iotests.py | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-
Simplify backup_incremental_init_copy_bitmap using the function
bdrv_dirty_bitmap_next_dirty_area.
Note: move to job->len instead of bitmap size: it should not matter but
less code.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/backup.c | 40
1 f
Otherwise, if we have serialized read-part in copy_range from backing
file to its parent if CoW take place, this CoW's sub-reads will
intersect with firstly created serialized read request.
Anyway, reads should not influence on disk view, let's allow them to
intersect.
Signed-off-by: Vladimir Sem
Move copy-bitmap find/create code. It's needed for the following
commit, as we'll need copy_bitmap before actual block job creation. Do
it in a separate commit to simplify review.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/backup.c | 67
We are going to share this bitmap between backup and backup-top filter
driver, so let's share something more meaningful. It also simplifies
some calculations.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/backup.c | 48 +++-
1 file changed, 23
From: Vladimir Sementsov-Ogievskiy
Introduce lock/unlock range functionality, based on serialized
requests. This is needed to refactor backup, dropping local
tracked-request-like synchronization.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
include/block/block_int.h | 3 +++
block/io.c
Drop write notifiers and use filter node instead. Changes:
1. copy-before-writes now handled by filter node, so, drop all
is_write_notifier arguments.
2. we don't have intersecting requests, so their handling is dropped.
Instead, synchronization works as follows:
when backup or backup-top star
As it already said in the comment, we don't want to create loops in
parent->child relations. So, when we try to append @to to @c, we should
check that @c is not in @to children subtree, and we should check it
recursively, not only the first level. The patch provides BFS-based
search, to check the r
After node graph changes, we may not be able to resume_drive by device
name (backing files are not recursively searched). So, lets allow to
resume by node-name. Set constant name for breakpoints, to avoid
introducing extra parameters.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-io
Backup-top filter does copy-before-write operation. It should be
inserted above active disk and has a target node for CBW, like the
following:
+---+
| Guest |
+---+---+
|r,w
v
+---+---+ target +---+
| backup_top|-->| target
Backup will append fleecing-hook node above source node, so, we can't
resume by device name (because resume don't search recursively through
backing chain).
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/055 | 23 +--
1 file changed, 13 insertions(+), 10 d
Kevin Wolf writes:
> Am 15.10.2018 um 12:02 hat Peter Maydell geschrieben:
>> On 15 October 2018 at 10:32, Daniel P. Berrangé wrote:
>> > On Sat, Oct 13, 2018 at 02:02:27AM -0300, Eduardo Habkost wrote:
>> >> Signed-off-by: Eduardo Habkost
>> >> ---
>> >> I'd like to do this in QEMU 3.1. I thi
On 11.10.18 12:58, Alberto Garcia wrote:
> This doesn't have any practical effect at the moment because the
> values of BDRV_SECTOR_SIZE, QCRYPTO_BLOCK_LUKS_SECTOR_SIZE and
> QCRYPTO_BLOCK_QCOW_SECTOR_SIZE are all the same (512 bytes), but
> future encryption methods could have different requiremen
Render block nodes graph with help of graphviz. This new function is
for debugging, so there is no sense to put it into qemu.py as a method
of QEMUMachine. Let's instead put it separately.
Signed-off-by: Vladimir Sementsov-Ogievskiy
Acked-by: Eduardo Habkost
Reviewed-by: Max Reitz
---
scripts/
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/222 | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/qemu-iotests/222 b/tests/qemu-iotests/222
index 0ead56d574..91d88aa5c0 100644
--- a/tests/qemu-iotests/222
+++ b/tests/qemu-iotests/222
@@ -137,6 +137,8 @@ with iotes
Hi all!
On the way of backup schemes development (and in general any complicated
developments in Qemu block layer) it would be good to have an ability to print
out graph of block nodes with their permissions.
v4:
01: fix !name -> !*name for checking the result of blk_name
rename BlockGraph ->
Add a new command, returning block nodes (and their users) graph.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
qapi/block-core.json | 108
include/block/block.h | 1 +
include/sysemu/block-backend.h | 2 +
block.c| 147 ++
On 15 October 2018 at 17:33, Markus Armbruster wrote:
> Kevin Wolf writes:
>
>> Am 15.10.2018 um 12:02 hat Peter Maydell geschrieben:
>> It's easier to port stuff to Python 3 though than making them work with
>> both. I think Eduardo's RFC is in part motivated by a patch from
>> Philippe that con
Following the example of qemu_opts_print_help(), indent all entries in
the list of character devices.
Signed-off-by: Max Reitz
---
chardev/char.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chardev/char.c b/chardev/char.c
index e115166995..10d44aaefc 100644
--- a/chardev/
This adds some whitespace into the option help (including indentation)
and replaces '=' by ': ' (not least because '=' should be used for
values, not types). Furthermore, the list name is no longer printed as
part of every line, but only once in advance, and only if the caller did
not print a capt
Just like in qemu_opts_print_help(), print the object name as a caption
instead of on every single line, indent all options, and replace the '='
by ': '.
Also, indent every object name in the list of available objects.
Signed-off-by: Max Reitz
---
vl.c | 12
1 file changed, 8 inser
I noticed that with the (more or less) recent series from Marc-André the
output of qemu-img amend -f qcow2 -o help changed to this:
$ ./qemu-img amend -f qcow2 -o help
Creation options for 'qcow2':
qcow2-create-opts.backing_file=str - File name of a base image
qcow2-create-opts.backing_fmt=str - I
Just like in qemu_opts_print_help(), print the device name as a caption
instead of on every single line, indent all options, and replace the '='
by ': '.
Signed-off-by: Max Reitz
---
qdev-monitor.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/qdev-monitor.c b/qdev-mo
There is no good reason why there should be a newline in this
description, so remove it.
Signed-off-by: Max Reitz
---
vl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vl.c b/vl.c
index f9ed053eab..19f8cc67ff 100644
--- a/vl.c
+++ b/vl.c
@@ -529,7 +529,7 @@ static QemuOpts
On Mon, Oct 15, 2018 at 05:55:27PM +0100, Peter Maydell wrote:
> On 15 October 2018 at 17:33, Markus Armbruster wrote:
> > Kevin Wolf writes:
> >
> >> Am 15.10.2018 um 12:02 hat Peter Maydell geschrieben:
> >> It's easier to port stuff to Python 3 though than making them work with
> >> both. I th
On 10/15/2018 06:33 PM, Markus Armbruster wrote:
> Kevin Wolf writes:
>
>> Am 15.10.2018 um 12:02 hat Peter Maydell geschrieben:
>>> On 15 October 2018 at 10:32, Daniel P. Berrangé wrote:
On Sat, Oct 13, 2018 at 02:02:27AM -0300, Eduardo Habkost wrote:
> Signed-off-by: Eduardo Habkos
On Mon, Oct 15, 2018 at 08:19:18PM +0200, Christian Borntraeger wrote:
>
>
> On 10/15/2018 06:33 PM, Markus Armbruster wrote:
> > Kevin Wolf writes:
> >
> >> Am 15.10.2018 um 12:02 hat Peter Maydell geschrieben:
> >>> On 15 October 2018 at 10:32, Daniel P. Berrangé
> >>> wrote:
> On Sat,
On 10/15/2018 08:33 PM, Eduardo Habkost wrote:
> On Mon, Oct 15, 2018 at 08:19:18PM +0200, Christian Borntraeger wrote:
[...]
It's easier to port stuff to Python 3 though than making them work with
both. I think Eduardo's RFC is in part motivated by a patch from
Philippe tha
On 10/15/18 10:14 AM, Max Reitz wrote:
> There are two imports that need to be modified when running the iotests
> under Python 3: One is StringIO, which no longer exists; instead, the
> StringIO class comes from the io module, so import it from there. The
> other is the ConfigParser, which has
On Mon, Oct 15, 2018 at 04:14:45PM +0200, Max Reitz wrote:
> When closing a connection, make the nbd-fault-injector flush the socket.
> Without this, the output is a bit unreliable with Python 3.
>
> Signed-off-by: Max Reitz
Reviewed-by: Eduardo Habkost
--
Eduardo
On Mon, Oct 15, 2018 at 04:14:46PM +0200, Max Reitz wrote:
> After issuing a command, flush the pipe. This does not change anything
> in Python 2, but it makes a difference in Python 3.
>
> Signed-off-by: Max Reitz
Reviewed-by: Eduardo Habkost
--
Eduardo
On Mon, Oct 15, 2018 at 04:14:48PM +0200, Max Reitz wrote:
> In Python 3, / is always a floating-point division. We usually do not
> want this, and as Python 2.7 understands // as well, change all integer
> divisions to use that.
>
> Signed-off-by: Max Reitz
Reviewed-by: Eduardo Habkost
--
E
On Mon, Oct 15, 2018 at 04:14:47PM +0200, Max Reitz wrote:
> Since byte strings are no longer the default in Python 3, we have to
> explicitly use them where we need to, which is mostly when working with
> structures. It also means that we need to open a file in binary mode
> when we want to use s
While testing the Python 3 changes which touch the 083 test, I noticed
that it would fail with qcow2. Expanding the testing, I noticed it
had nothing to do with the Python 3 changes, and in fact, it would not
pass on anything but raw:
raw: pass
bochs: not generic
cloop: not generic
parallels:
On Mon, Oct 15, 2018 at 04:14:49PM +0200, Max Reitz wrote:
> In Python 3, several functions now return iterators instead of lists.
> This includes range(), items(), map(), and filter(). This means that if
> we really want a list, we have to wrap those instances with list(). On
> the other hand, s
On Mon, Oct 15, 2018 at 02:59:28PM -0400, Cleber Rosa wrote:
>
>
> On 10/15/18 10:14 AM, Max Reitz wrote:
> > There are two imports that need to be modified when running the iotests
> > under Python 3: One is StringIO, which no longer exists; instead, the
> > StringIO class comes from the io modu
On 10/15/18 10:14 AM, Max Reitz wrote:
> When closing a connection, make the nbd-fault-injector flush the socket.
> Without this, the output is a bit unreliable with Python 3.
>
> Signed-off-by: Max Reitz
Reviewed-by: Cleber Rosa
On Mon, Oct 15, 2018 at 04:14:50PM +0200, Max Reitz wrote:
> Python 3.2 introduced the inheritable attribute for FDs. At the same
> time, it changed the default so that all FDs are not inheritable by
> default, that only inheritable FDs are inherited to subprocesses, and
> only if close_fds is exp
On 10/15/18 10:14 AM, Max Reitz wrote:
> After issuing a command, flush the pipe. This does not change anything
> in Python 2, but it makes a difference in Python 3.
>
> Signed-off-by: Max Reitz
Reviewed-by: Cleber Rosa
On 10/15/18 10:14 AM, Max Reitz wrote:
> In Python 3, / is always a floating-point division. We usually do not
> want this, and as Python 2.7 understands // as well, change all integer
> divisions to use that.
>
> Signed-off-by: Max Reitz
> ---
> tests/qemu-iotests/040| 4 ++--
> te
On Mon, Oct 15, 2018 at 04:14:51PM +0200, Max Reitz wrote:
> iotest 169 uses the 'new' module to add methods to a class. This module
> no longer exists in Python 3. Instead, we can use a lambda. Best of
> all, this works in 2.7 just as well.
>
> Signed-off-by: Max Reitz
> ---
> tests/qemu-iot
On Mon, Oct 15, 2018 at 04:14:52PM +0200, Max Reitz wrote:
> There are two imports that need to be modified when running the iotests
> under Python 3: One is StringIO, which no longer exists; instead, the
> StringIO class comes from the io module, so import it from there. The
> other is the Config
On 15/10/2018 16:14, Max Reitz wrote:
> Since byte strings are no longer the default in Python 3, we have to
> explicitly use them where we need to, which is mostly when working with
> structures. It also means that we need to open a file in binary mode
> when we want to use structures.
>
> On th
Hi Max,
On 15/10/2018 16:14, Max Reitz wrote:
> This series prepares the iotests to work with both Python 2 and 3. In
> some places, it adds version-specific code and decides what to do based
> on the version (for instance, whether to import the StringIO class from
> the 'io' or the 'StringIO' mo
On Mon, Oct 15, 2018 at 04:14:53PM +0200, Max Reitz wrote:
> When dumping an object into the log, there are differences between
> Python 2 and 3. First, unicode strings are prefixed by 'u' in Python 2
> (they are no longer in 3, because unicode strings are the default
> there). [...]
This could
On 15/10/2018 19:28, Max Reitz wrote:
> There is no good reason why there should be a newline in this
> description, so remove it.
>
> Signed-off-by: Max Reitz
Reviewed-by: Philippe Mathieu-Daudé
> ---
> vl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/vl.c b/vl.
On 10/15/18 10:14 AM, Max Reitz wrote:
> In Python 3, several functions now return iterators instead of lists.
> This includes range(), items(), map(), and filter(). This means that if
> we really want a list, we have to wrap those instances with list(). On
> the other hand, sometimes we do ju
On 10/15/18 10:14 AM, Max Reitz wrote:
> Python 3.2 introduced the inheritable attribute for FDs. At the same
> time, it changed the default so that all FDs are not inheritable by
> default, that only inheritable FDs are inherited to subprocesses, and
> only if close_fds is explicitly set to Fa
On 10/15/18 10:14 AM, Max Reitz wrote:
> iotest 169 uses the 'new' module to add methods to a class. This module
> no longer exists in Python 3. Instead, we can use a lambda. Best of
> all, this works in 2.7 just as well.
>
> Signed-off-by: Max Reitz
> ---
> tests/qemu-iotests/169 | 3 +--
On Mon, Oct 15, 2018 at 07:38:45PM -0400, Cleber Rosa wrote:
>
>
> On 10/15/18 10:14 AM, Max Reitz wrote:
> > iotest 169 uses the 'new' module to add methods to a class. This module
> > no longer exists in Python 3. Instead, we can use a lambda. Best of
> > all, this works in 2.7 just as well.
On 10/15/18 5:17 PM, Eduardo Habkost wrote:
> On Mon, Oct 15, 2018 at 04:14:52PM +0200, Max Reitz wrote:
>> There are two imports that need to be modified when running the iotests
>> under Python 3: One is StringIO, which no longer exists; instead, the
>> StringIO class comes from the io module,
On Mon, Oct 15, 2018 at 08:05:02PM -0400, Cleber Rosa wrote:
>
>
> On 10/15/18 5:17 PM, Eduardo Habkost wrote:
> > On Mon, Oct 15, 2018 at 04:14:52PM +0200, Max Reitz wrote:
> >> There are two imports that need to be modified when running the iotests
> >> under Python 3: One is StringIO, which no
On 10/15/18 7:57 PM, Eduardo Habkost wrote:
> On Mon, Oct 15, 2018 at 07:38:45PM -0400, Cleber Rosa wrote:
>>
>>
>> On 10/15/18 10:14 AM, Max Reitz wrote:
>>> iotest 169 uses the 'new' module to add methods to a class. This module
>>> no longer exists in Python 3. Instead, we can use a lambda.
Eduardo Habkost writes:
> On Mon, Oct 15, 2018 at 05:55:27PM +0100, Peter Maydell wrote:
>> On 15 October 2018 at 17:33, Markus Armbruster wrote:
>> > Kevin Wolf writes:
>> >
>> >> Am 15.10.2018 um 12:02 hat Peter Maydell geschrieben:
>> >> It's easier to port stuff to Python 3 though than maki
bdrv_img_create() takes an Error ** argument and used it in the
conventional way, except for one place: when qemu_opts_do_parse()
fails, it first reports its error to stderr or the HMP monitor with
error_report_err(), then error_setg()'s a generic error. When the
caller reports that second error s
Hi
On Mon, Oct 15, 2018 at 9:34 PM Max Reitz wrote:
>
> This adds some whitespace into the option help (including indentation)
> and replaces '=' by ': ' (not least because '=' should be used for
> values, not types).
Without strong preference, I like the '=' better: it's the expected
syntax for
On 14/10/2018 16:55, Artem Pisarenko wrote:
> Attributes are simple flags, associated with individual timers for their
> whole lifetime.
> They intended to be used to mark individual timers for special handling by
> various qemu features operating at qemu core level.
> Existing timer, aio and cor
On Sat 13 Oct 2018 10:52:31 AM CEST, Li Qiang wrote:
> Signed-off-by: Li Qiang
Reviewed-by: Alberto Garcia
Berto
On Sat, Oct 13, 2018 at 02:02:27AM -0300, Eduardo Habkost wrote:
> Signed-off-by: Eduardo Habkost
> ---
> I'd like to do this in QEMU 3.1. I think it's time to drop
> support for old systems that have only Python 2.
>
> We still have a few scripts that are not required for building
> QEMU that st
Am 12.10.2018 um 18:47 hat Eric Blake geschrieben:
> On 10/12/18 6:55 AM, Kevin Wolf wrote:
> > If a management application builds the block graph node by node, the
> > protocol layer doesn't inherit its read-only option from the format
> > layer any more, so it must be set explicitly.
> >
>
> >
ping
18.09.2018 13:37, Vladimir Sementsov-Ogievskiy wrote:
> 17.09.2018 21:33, John Snow wrote:
>>
>> On 09/17/2018 11:51 AM, Vladimir Sementsov-Ogievskiy wrote:
>>> Hmm, ping, anybody here ?)
>>>
>> Was preparing to stage on Friday, working on it now.
>>
>> I never understood why you forbid the t
On 15 October 2018 at 10:32, Daniel P. Berrangé wrote:
> On Sat, Oct 13, 2018 at 02:02:27AM -0300, Eduardo Habkost wrote:
>> Signed-off-by: Eduardo Habkost
>> ---
>> I'd like to do this in QEMU 3.1. I think it's time to drop
>> support for old systems that have only Python 2.
>>
>> We still have
Am 13.10.2018 um 10:52 hat Li Qiang geschrieben:
> Signed-off-by: Li Qiang
Thanks, applied to the block branch.
Kevin
On Mon, Oct 15, 2018 at 11:02:03AM +0100, Peter Maydell wrote:
> On 15 October 2018 at 10:32, Daniel P. Berrangé wrote:
> > On Sat, Oct 13, 2018 at 02:02:27AM -0300, Eduardo Habkost wrote:
> >> Signed-off-by: Eduardo Habkost
> >> ---
> >> I'd like to do this in QEMU 3.1. I think it's time to dro
Am 15.10.2018 um 12:02 hat Peter Maydell geschrieben:
> On 15 October 2018 at 10:32, Daniel P. Berrangé wrote:
> > On Sat, Oct 13, 2018 at 02:02:27AM -0300, Eduardo Habkost wrote:
> >> Signed-off-by: Eduardo Habkost
> >> ---
> >> I'd like to do this in QEMU 3.1. I think it's time to drop
> >> su
On 15.10.18 07:55, Markus Armbruster wrote:
> Max Reitz writes:
>
>> On 13.10.18 22:36, Eduardo Habkost wrote:
>>> On Sat, Oct 13, 2018 at 08:20:25PM +0200, Max Reitz wrote:
On 13.10.18 07:02, Eduardo Habkost wrote:
> Signed-off-by: Eduardo Habkost
> ---
> I'd like to do this in
On 15.10.18 13:01, Max Reitz wrote:
> On 15.10.18 07:55, Markus Armbruster wrote:
>> Max Reitz writes:
>>
>>> On 13.10.18 22:36, Eduardo Habkost wrote:
On Sat, Oct 13, 2018 at 08:20:25PM +0200, Max Reitz wrote:
> On 13.10.18 07:02, Eduardo Habkost wrote:
>> Signed-off-by: Eduardo Habk
This series prepares the iotests to work with both Python 2 and 3. In
some places, it adds version-specific code and decides what to do based
on the version (for instance, whether to import the StringIO class from
the 'io' or the 'StringIO' module), but most of the time, it just makes
code work fo
When closing a connection, make the nbd-fault-injector flush the socket.
Without this, the output is a bit unreliable with Python 3.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/083.out | 9 +
tests/qemu-iotests/nbd-fault-injector.py | 1 +
2 files changed, 10 insertions
In Python 3, several functions now return iterators instead of lists.
This includes range(), items(), map(), and filter(). This means that if
we really want a list, we have to wrap those instances with list(). On
the other hand, sometimes we do just want an iterator, in which case we
have sometim
After issuing a command, flush the pipe. This does not change anything
in Python 2, but it makes a difference in Python 3.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/iotests.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
In Python 3, / is always a floating-point division. We usually do not
want this, and as Python 2.7 understands // as well, change all integer
divisions to use that.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/040| 4 ++--
tests/qemu-iotests/044| 2 +-
tests/qemu-iotests/09
Since byte strings are no longer the default in Python 3, we have to
explicitly use them where we need to, which is mostly when working with
structures. It also means that we need to open a file in binary mode
when we want to use structures.
On the other hand, we have to accomodate for the fact t
78 matches
Mail list logo