qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 0c8de0: iotests: fix _check_o_direct


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 0c8de0: iotests: fix _check_o_direct
Date: Wed, 27 Jan 2021 09:40:19 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 0c8de0a1330f7088b6f6659e92e8b23c8a1e2137
      
https://github.com/qemu/qemu/commit/0c8de0a1330f7088b6f6659e92e8b23c8a1e2137
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M tests/qemu-iotests/common.rc

  Log Message:
  -----------
  iotests: fix _check_o_direct

Unfortunately commit "iotests: handle tmpfs" breaks running iotests
with -nbd -nocache, as _check_o_direct tries to create
$TEST_IMG.test_o_direct, but in case of nbd TEST_IMG is something like
nbd+unix:///... , and test fails with message

  qemu-img: nbd+unix:///?socket[...]test_o_direct: Protocol driver
    'nbd' does not support image creation, and opening the image
    failed: Failed to connect to '/tmp/tmp.[...]/nbd/test_o_direct': No
    such file or directory

Use TEST_DIR instead.

Fixes: cfdca2b9f9d4ca26bb2b2dfe8de3149092e39170
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20201218182012.47607-1-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 1252e03b8e6ff56f53bd826e1ceeb21ab4858a92
      
https://github.com/qemu/qemu/commit/1252e03b8e6ff56f53bd826e1ceeb21ab4858a92
  Author: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/copy-on-read.c

  Log Message:
  -----------
  copy-on-read: support preadv/pwritev_part functions

Add support for the recently introduced functions
bdrv_co_preadv_part()
and
bdrv_co_pwritev_part()
to the COR-filter driver.

Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20201216061703.70908-2-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 8872ef78ab6d9cadfc9223bc3f3b8a1b86939bbc
      
https://github.com/qemu/qemu/commit/8872ef78ab6d9cadfc9223bc3f3b8a1b86939bbc
  Author: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block.c
    M include/block/block.h

  Log Message:
  -----------
  block: add API function to insert a node

Provide API for insertion a node to backing chain.

Suggested-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20201216061703.70908-3-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 16e09a21af7245abc82616010a96a48e637734db
      
https://github.com/qemu/qemu/commit/16e09a21af7245abc82616010a96a48e637734db
  Author: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/copy-on-read.c
    A block/copy-on-read.h

  Log Message:
  -----------
  copy-on-read: add filter drop function

Provide API for the COR-filter removal. Also, drop the filter child
permissions for an inactive state when the filter node is being
removed.
To insert the filter, the block generic layer function
bdrv_insert_node() can be used.
The new function bdrv_cor_filter_drop() may be considered as an
intermediate solution before the QEMU permission update system has
overhauled. Then we are able to implement the API function
bdrv_remove_node() on the block generic layer.

Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20201216061703.70908-4-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 880747a887a3c2ee022b7f610e54e08b84deb1af
      
https://github.com/qemu/qemu/commit/880747a887a3c2ee022b7f610e54e08b84deb1af
  Author: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/monitor/block-hmp-cmds.c
    M block/stream.c
    M blockdev.c
    M include/block/block_int.h
    M qapi/block-core.json

  Log Message:
  -----------
  qapi: add filter-node-name to block-stream

Provide the possibility to pass the 'filter-node-name' parameter to the
block-stream job as it is done for the commit block job.

Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  [vsementsov: comment indentation, s/Since: 5.2/Since: 6.0/]
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20201216061703.70908-5-vsementsov@virtuozzo.com>
[mreitz: s/commit/stream/]
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: e4c8fddde79d45b061d29e69bb564ea73d027a7a
      
https://github.com/qemu/qemu/commit/e4c8fddde79d45b061d29e69bb564ea73d027a7a
  Author: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/copy-on-read.c
    M qapi/block-core.json

  Log Message:
  -----------
  qapi: copy-on-read filter: add 'bottom' option

Add an option to limit copy-on-read operations to specified sub-chain
of backing-chain, to make copy-on-read filter useful for block-stream
job.

Suggested-by: Max Reitz <mreitz@redhat.com>
Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  [vsementsov: change subject, modified to freeze the chain,
   do some fixes]
Message-Id: <20201216061703.70908-6-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: b6e0985a4c48eb4f5ed115759bc816322942f39c
      
https://github.com/qemu/qemu/commit/b6e0985a4c48eb4f5ed115759bc816322942f39c
  Author: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    A tests/qemu-iotests/310
    A tests/qemu-iotests/310.out
    M tests/qemu-iotests/group

  Log Message:
  -----------
  iotests: add #310 to test bottom node in COR driver

The test case #310 is similar to #216 by Max Reitz. The difference is
that the test #310 involves a bottom node to the COR filter driver.

Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  [vsementsov: detach backing to test reads from top, limit to qcow2]
Message-Id: <20201216061703.70908-7-vsementsov@virtuozzo.com>
[mreitz: Add "# group:" line]
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 897dd0ec4fdea4e6fa7674729750d05acc1bf41e
      
https://github.com/qemu/qemu/commit/897dd0ec4fdea4e6fa7674729750d05acc1bf41e
  Author: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/io.c
    M include/block/block_int.h

  Log Message:
  -----------
  block: include supported_read_flags into BDS structure

Add the new member supported_read_flags to the BlockDriverState
structure. It will control the flags set for copy-on-read operations.
Make the block generic layer evaluate supported read flags before they
go to a block driver.

Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
 [vsementsov: use assert instead of abort]
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20201216061703.70908-8-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: e275458b29b7040a388ca46af094b0602c769ef1
      
https://github.com/qemu/qemu/commit/e275458b29b7040a388ca46af094b0602c769ef1
  Author: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/copy-on-read.c
    M include/block/block.h

  Log Message:
  -----------
  copy-on-read: skip non-guest reads if no copy needed

If the flag BDRV_REQ_PREFETCH was set, skip idling read/write
operations in COR-driver. It can be taken into account for the
COR-algorithms optimization. That check is being made during the
block stream job by the moment.

Add the BDRV_REQ_PREFETCH flag to the supported_read_flags of the
COR-filter.

block: Modify the comment for the flag BDRV_REQ_PREFETCH as we are
going to use it alone and pass it to the COR-filter driver for further
processing.

Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20201216061703.70908-9-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 000e5a1cda09e18af91556a39b5a4f1214becb3c
      
https://github.com/qemu/qemu/commit/000e5a1cda09e18af91556a39b5a4f1214becb3c
  Author: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/stream.c
    M blockdev.c

  Log Message:
  -----------
  stream: rework backing-file changing

Stream in stream_prepare calls bdrv_change_backing_file() to change
backing-file in the metadata of bs.

It may use either backing-file parameter given by user or just take
filename of base on job start.

Backing file format is determined by base on job finish.

There are some problems with this design, we solve only two by this
patch:

1. Consider scenario with backing-file unset. Current concept of stream
supports changing of the base during the job (we don't freeze link to
the base). So, we should not save base filename at job start,

  - let's determine name of the base on job finish.

2. Using direct base to determine filename and format is not very good:
base node may be a filter, so its filename may be JSON, and format_name
is not good for storing into qcow2 metadata as backing file format.

  - let's use unfiltered_base

Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  [vsementsov: change commit subject, change logic in stream_prepare]
Message-Id: <20201216061703.70908-10-vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 7f4a396d76670bbffd6c3ba9a550a1bb62ae6267
      
https://github.com/qemu/qemu/commit/7f4a396d76670bbffd6c3ba9a550a1bb62ae6267
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/monitor/block-hmp-cmds.c
    M block/stream.c
    M blockdev.c
    M include/block/block_int.h
    M qapi/block-core.json

  Log Message:
  -----------
  qapi: block-stream: add "bottom" argument

The code already don't freeze base node and we try to make it prepared
for the situation when base node is changed during the operation. In
other words, block-stream doesn't own base node.

Let's introduce a new interface which should replace the current one,
which will in better relations with the code. Specifying bottom node
instead of base, and requiring it to be non-filter gives us the
following benefits:

 - drop difference between above_base and base_overlay, which will be
   renamed to just bottom, when old interface dropped

 - clean way to work with parallel streams/commits on the same backing
   chain, which otherwise become a problem when we introduce a filter
   for stream job

 - cleaner interface. Nobody will surprised the fact that base node may
   disappear during block-stream, when there is no word about "base" in
   the interface.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20201216061703.70908-11-vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 9126a2dc4bde9dd282edc44c5e714b62dbe94918
      
https://github.com/qemu/qemu/commit/9126a2dc4bde9dd282edc44c5e714b62dbe94918
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M tests/qemu-iotests/030

  Log Message:
  -----------
  iotests: 30: prepare to COR filter insertion by stream job

test_stream_parallel run parallel stream jobs, intersecting so that top
of one is base of another. It's OK now, but it would be a problem if
insert the filter, as one job will want to use another job's filter as
above_base node.

Correct thing to do is move to new interface: "bottom" argument instead
of base. This guarantees that jobs don't intersect by their actions.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20201216061703.70908-12-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 0f6c94988afdf38228abdaf0b5504cc115f63836
      
https://github.com/qemu/qemu/commit/0f6c94988afdf38228abdaf0b5504cc115f63836
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/stream.c

  Log Message:
  -----------
  block/stream: add s->target_bs

Add a direct link to target bs for convenience and to simplify
following commit which will insert COR filter above target bs.

This is a part of original commit written by Andrey.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20201216061703.70908-13-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 205736f4888e6c2bf1a78712cf0fc84d9f7cbcee
      
https://github.com/qemu/qemu/commit/205736f4888e6c2bf1a78712cf0fc84d9f7cbcee
  Author: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/stream.c
    M tests/qemu-iotests/030
    M tests/qemu-iotests/141.out
    M tests/qemu-iotests/245

  Log Message:
  -----------
  block: apply COR-filter to block-stream jobs

This patch completes the series with the COR-filter applied to
block-stream operations.

Adding the filter makes it possible in future implement discarding
copied regions in backing files during the block-stream job, to reduce
the disk overuse (we need control on permissions).

Also, the filter now is smart enough to do copy-on-read with specified
base, so we have benefit on guest reads even when doing block-stream of
the part of the backing chain.

Several iotests are slightly modified due to filter insertion.

Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20201216061703.70908-14-vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 3e0105e0590d74e8deaf9a52a0009334e0bbe74f
      
https://github.com/qemu/qemu/commit/3e0105e0590d74e8deaf9a52a0009334e0bbe74f
  Author: Max Reitz <mreitz@redhat.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M tests/qemu-iotests/300
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests.py: Assume a couple of variables as given

There are a couple of environment variables that we fetch with
os.environ.get() without supplying a default.  Clearly they are required
and expected to be set by the ./check script (as evidenced by
execute_setup_common(), which checks for test_dir and
qemu_default_machine to be set, and aborts if they are not).

Using .get() this way has the disadvantage of returning an Optional[str]
type, which mypy will complain about when tests just assume these values
to be str.

Use [] instead, which raises a KeyError for environment variables that
are not set.  When this exception is raised, catch it and move the abort
code from execute_setup_common() there.

Drop the 'assert iotests.sock_dir is not None' from iotest 300, because
that sort of thing is precisely what this patch wants to prevent.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-Id: <20210118105720.14824-2-mreitz@redhat.com>


  Commit: 59aec869822c02cfd0c929b48bfdc6da99cd1665
      
https://github.com/qemu/qemu/commit/59aec869822c02cfd0c929b48bfdc6da99cd1665
  Author: Max Reitz <mreitz@redhat.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M tests/qemu-iotests/297
    M tests/qemu-iotests/297.out

  Log Message:
  -----------
  iotests/297: Rewrite in Python and extend reach

Instead of checking iotests.py only, check all Python files in the
qemu-iotests/ directory.  Of course, most of them do not pass, so there
is an extensive skip list for now.  (The only files that do pass are
209, 254, 283, and iotests.py.)

(Alternatively, we could have the opposite, i.e. an explicit list of
files that we do want to check, but I think it is better to check files
by default.)

Unless started in debug mode (./check -d), the output has no information
on which files are tested, so we will not have a problem e.g. with
backports, where some files may be missing when compared to upstream.

Besides the technical rewrite, some more things are changed:

- For the pylint invocation, PYTHONPATH is adjusted.  This mirrors
  setting MYPYPATH for mypy.

- Also, MYPYPATH is now derived from PYTHONPATH, so that we include
  paths set by the environment.  Maybe at some point we want to let the
  check script add '../../python/' to PYTHONPATH so that iotests.py does
  not need to do that.

- Passing --notes=FIXME,XXX to pylint suppresses warnings for TODO
  comments.  TODO is fine, we do not need 297 to complain about such
  comments.

- The "Success" line from mypy's output is suppressed, because (A) it
  does not add useful information, and (B) it would leak information
  about the files having been tested to the reference output, which we
  decidedly do not want.

Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210118105720.14824-3-mreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>


  Commit: c5ff5a3caa16f18bea05db4e2326e9162e7a0ba9
      
https://github.com/qemu/qemu/commit/c5ff5a3caa16f18bea05db4e2326e9162e7a0ba9
  Author: Max Reitz <mreitz@redhat.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M tests/qemu-iotests/124
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests: Move try_remove to iotests.py

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-Id: <20210118105720.14824-4-mreitz@redhat.com>


  Commit: 20e2580eec0f9bb7789fe545a4d57da7ab8c2be8
      
https://github.com/qemu/qemu/commit/20e2580eec0f9bb7789fe545a4d57da7ab8c2be8
  Author: Max Reitz <mreitz@redhat.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M tests/qemu-iotests/129

  Log Message:
  -----------
  iotests/129: Remove test images in tearDown()

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-Id: <20210118105720.14824-5-mreitz@redhat.com>


  Commit: f9a6256b48f29c2816f6119c17b80b0e93d76c42
      
https://github.com/qemu/qemu/commit/f9a6256b48f29c2816f6119c17b80b0e93d76c42
  Author: Max Reitz <mreitz@redhat.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M tests/qemu-iotests/129

  Log Message:
  -----------
  iotests/129: Do not check @busy

@busy is false when the job is paused, which happens all the time
because that is how jobs yield (e.g. for mirror at least since commit
565ac01f8d3).

Back when 129 was added (2015), perhaps there was no better way of
checking whether the job was still actually running.  Now we have the
@status field (as of 58b295ba52c, i.e. 2018), which can give us exactly
that information.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-Id: <20210118105720.14824-6-mreitz@redhat.com>


  Commit: a1933dac8fc12db45bc7b242d2d044d489327439
      
https://github.com/qemu/qemu/commit/a1933dac8fc12db45bc7b242d2d044d489327439
  Author: Max Reitz <mreitz@redhat.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M tests/qemu-iotests/129

  Log Message:
  -----------
  iotests/129: Use throttle node

Throttling on the BB has not affected block jobs in a while, so it is
possible that one of the jobs in 129 finishes before the VM is stopped.
We can fix that by running the job from a throttle node.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-Id: <20210118105720.14824-7-mreitz@redhat.com>


  Commit: 55557b02459915e8833b8f9645a5a13f74b7e157
      
https://github.com/qemu/qemu/commit/55557b02459915e8833b8f9645a5a13f74b7e157
  Author: Max Reitz <mreitz@redhat.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M tests/qemu-iotests/129

  Log Message:
  -----------
  iotests/129: Actually test a commit job

Before this patch, test_block_commit() performs an active commit, which
under the hood is a mirror job.  If we want to test various different
block jobs, we should perhaps run an actual commit job instead.

Doing so requires adding an overlay above the source node before the
commit is done (and then specifying the source node as the top node for
the commit job).

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-Id: <20210118105720.14824-8-mreitz@redhat.com>


  Commit: 20c15f7c5248ae75df9c6f7b5b1433632420eda9
      
https://github.com/qemu/qemu/commit/20c15f7c5248ae75df9c6f7b5b1433632420eda9
  Author: Max Reitz <mreitz@redhat.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M tests/qemu-iotests/129

  Log Message:
  -----------
  iotests/129: Limit mirror job's buffer size

Issuing 'stop' on the VM drains all nodes.  If the mirror job has many
large requests in flight, this may lead to significant I/O that looks a
bit like 'stop' would make the job try to complete (which is what 129
should verify not to happen).

We can limit the I/O in flight by limiting the buffer size, so mirror
will make very little progress during the 'stop' drain.

(We do not need to do anything about commit, which has a buffer size of
512 kB by default; or backup, which goes cluster by cluster.  Once we
have asynchronous requests for backup, that will change, but then we can
fine-tune the backup job to only perform a single request on a very
small chunk, too.)

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-Id: <20210118105720.14824-9-mreitz@redhat.com>


  Commit: 636aa64d488fcc21b003007e21e185212c0c0a27
      
https://github.com/qemu/qemu/commit/636aa64d488fcc21b003007e21e185212c0c0a27
  Author: Max Reitz <mreitz@redhat.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M tests/qemu-iotests/129
    M tests/qemu-iotests/297

  Log Message:
  -----------
  iotests/129: Clean up pylint and mypy complaints

And consequentially drop it from 297's skip list.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20210118105720.14824-10-mreitz@redhat.com>


  Commit: 59c9466d58a9280c9a6ceaa9f38537977eac85f9
      
https://github.com/qemu/qemu/commit/59c9466d58a9280c9a6ceaa9f38537977eac85f9
  Author: Max Reitz <mreitz@redhat.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M tests/qemu-iotests/297
    M tests/qemu-iotests/300

  Log Message:
  -----------
  iotests/300: Clean up pylint and mypy complaints

And consequentially drop it from 297's skip list.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-Id: <20210118105720.14824-11-mreitz@redhat.com>


  Commit: f4be8225198c4616b391d13d4ba083bf40f3a0c9
      
https://github.com/qemu/qemu/commit/f4be8225198c4616b391d13d4ba083bf40f3a0c9
  Author: Max Reitz <mreitz@redhat.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M util/coroutine-sigaltstack.c

  Log Message:
  -----------
  coroutine-sigaltstack: Add SIGUSR2 mutex

Disposition (action) for any given signal is global for the process.
When two threads run coroutine-sigaltstack's qemu_coroutine_new()
concurrently, they may interfere with each other: One of them may revert
the SIGUSR2 handler to SIG_DFL, between the other thread (a) setting up
coroutine_trampoline() as the handler and (b) raising SIGUSR2.  That
SIGUSR2 will then terminate the QEMU process abnormally.

We have to ensure that only one thread at a time can modify the
process-global SIGUSR2 handler.  To do so, wrap the whole section where
that is done in a mutex.

Alternatively, we could for example have the SIGUSR2 handler always be
coroutine_trampoline(), so there would be no need to invoke sigaction()
in qemu_coroutine_new().  Laszlo has posted a patch to do so here:

  https://lists.nongnu.org/archive/html/qemu-devel/2021-01/msg05962.html

However, given that coroutine-sigaltstack is more of a fallback
implementation for platforms that do not support ucontext, that change
may be a bit too invasive to be comfortable with it.  The mutex proposed
here may negatively impact performance, but the change is much simpler.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210125120305.19520-1-mreitz@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>


  Commit: 86c6a3b690df768806322e759f94be7a72c4fcb9
      
https://github.com/qemu/qemu/commit/86c6a3b690df768806322e759f94be7a72c4fcb9
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/backup-top.c
    M block/backup-top.h
    M block/backup.c
    M block/block-copy.c
    M block/replication.c
    M blockdev.c
    M include/block/block-copy.h
    M include/block/block_int.h
    M qapi/block-core.json

  Log Message:
  -----------
  qapi: backup: add perf.use-copy-range parameter

Experiments show, that copy_range is not always making things faster.
So, to make experimentation simpler, let's add a parameter. Some more
perf parameters will be added soon, so here is a new struct.

For now, add new backup qmp parameter with x- prefix for the following
reasons:

 - We are going to add more performance parameters, some will be
   related to the whole block-copy process, some only to background
   copying in backup (ignored for copy-before-write operations).
 - On the other hand, we are going to use block-copy interface in other
   block jobs, which will need performance options as well.. And it
   should be the same structure or at least somehow related.

So, there are too much unclean things about how the interface and now
we need the new options mostly for testing. Let's keep them
experimental for a while.

In do_backup_common() new x-perf parameter handled in a way to
make further options addition simpler.

We add use-copy-range with default=true, and we'll change the default
in further patch, after moving backup to use block-copy.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-2-vsementsov@virtuozzo.com>
[mreitz: s/5\.2/6.0/]
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 3b8c2329b5d6ef1b6a94f00f5211f27fafcdee6b
      
https://github.com/qemu/qemu/commit/3b8c2329b5d6ef1b6a94f00f5211f27fafcdee6b
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/block-copy.c

  Log Message:
  -----------
  block/block-copy: More explicit call_state

Refactor common path to use BlockCopyCallState pointer as parameter, to
prepare it for use in asynchronous block-copy (at least, we'll need to
run block-copy in a coroutine, passing the whole parameters as one
pointer).

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-3-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: de4641b46b020c5b332175f80e8bfe3d352888e8
      
https://github.com/qemu/qemu/commit/de4641b46b020c5b332175f80e8bfe3d352888e8
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/block-copy.c
    M include/block/block-copy.h

  Log Message:
  -----------
  block/block-copy: implement block_copy_async

We'll need async block-copy invocation to use in backup directly.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-4-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 26be9d62dd5f5268b814da24fd8e8b5c5b999ebe
      
https://github.com/qemu/qemu/commit/26be9d62dd5f5268b814da24fd8e8b5c5b999ebe
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/block-copy.c
    M include/block/block-copy.h

  Log Message:
  -----------
  block/block-copy: add max_chunk and max_workers parameters

They will be used for backup.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-5-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 2e099a9d29b2f8791ceaa4a54479e613f45180bd
      
https://github.com/qemu/qemu/commit/2e099a9d29b2f8791ceaa4a54479e613f45180bd
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/block-copy.c

  Log Message:
  -----------
  block/block-copy: add list of all call-states

It simplifies debugging.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-6-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 7e032df0ea7a4a2272c9b14b97d3f620397dba6f
      
https://github.com/qemu/qemu/commit/7e032df0ea7a4a2272c9b14b97d3f620397dba6f
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/backup-top.c
    M block/backup.c
    M block/block-copy.c
    M include/block/block-copy.h

  Log Message:
  -----------
  block/block-copy: add ratelimit to block-copy

We are going to directly use one async block-copy operation for backup
job, so we need rate limiter.

We want to maintain current backup behavior: only background copying is
limited and copy-before-write operations only participate in limit
calculation. Therefore we need one rate limiter for block-copy state
and boolean flag for block-copy call state for actual limitation.

Note, that we can't just calculate each chunk in limiter after
successful copying: it will not save us from starting a lot of async
sub-requests which will exceed limit too much. Instead let's use the
following scheme on sub-request creation:
1. If at the moment limit is not exceeded, create the request and
account it immediately.
2. If at the moment limit is already exceeded, drop create sub-request
and handle limit instead (by sleep).
With this approach we'll never exceed the limit more than by one
sub-request (which pretty much matches current backup behavior).

Note also, that if there is in-flight block-copy async call,
block_copy_kick() should be used after set-speed to apply new setup
faster. For that block_copy_kick() published in this patch.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-7-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: a6d23d56df06027acb1202e64316b00d0c05aa75
      
https://github.com/qemu/qemu/commit/a6d23d56df06027acb1202e64316b00d0c05aa75
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/block-copy.c
    M include/block/block-copy.h

  Log Message:
  -----------
  block/block-copy: add block_copy_cancel

Add function to cancel running async block-copy call. It will be used
in backup.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-8-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: e0323a045f5929721c9f4b7437229f1dbdc5b5e5
      
https://github.com/qemu/qemu/commit/e0323a045f5929721c9f4b7437229f1dbdc5b5e5
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M blockjob.c
    M include/block/blockjob_int.h

  Log Message:
  -----------
  blockjob: add set_speed to BlockJobDriver

We are going to use async block-copy call in backup, so we'll need to
passthrough setting backup speed to block-copy call.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-9-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 3ee1483b95f314b960231c1c0b329bea4346f49c
      
https://github.com/qemu/qemu/commit/3ee1483b95f314b960231c1c0b329bea4346f49c
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M job.c
    M tests/qemu-iotests/109.out

  Log Message:
  -----------
  job: call job_enter from job_pause

If main job coroutine called job_yield (while some background process
is in progress), we should give it a chance to call job_pause_point().
It will be used in backup, when moved on async block-copy.

Note, that job_user_pause is not enough: we want to handle
child_job_drained_begin() as well, which call job_pause().

Still, if job is already in job_do_yield() in job_pause_point() we
should not enter it.

iotest 109 output is modified: on stop we do bdrv_drain_all() which now
triggers job pause immediately (and pause after ready is standby).

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20210116214705.822267-10-vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 2c59fd833a6c547e174b26ba3e1f88f5865e16cf
      
https://github.com/qemu/qemu/commit/2c59fd833a6c547e174b26ba3e1f88f5865e16cf
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/backup.c
    M block/replication.c
    M blockdev.c
    M qapi/block-core.json

  Log Message:
  -----------
  qapi: backup: add max-chunk and max-workers to x-perf struct

Add new parameters to configure future backup features. The patch
doesn't introduce aio backup requests (so we actually have only one
worker) neither requests larger than one cluster. Still, formally we
satisfy these maximums anyway, so add the parameters now, to facilitate
further patch which will really change backup job behavior.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-11-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 55f3e5cb3b187738b903ab72fe17472ab9354bd1
      
https://github.com/qemu/qemu/commit/55f3e5cb3b187738b903ab72fe17472ab9354bd1
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M tests/qemu-iotests/056

  Log Message:
  -----------
  iotests: 56: prepare for backup over block-copy

After introducing parallel async copy requests instead of plain
cluster-by-cluster copying loop, we'll have to wait for paused status,
as we need to wait for several parallel request. So, let's gently wait
instead of just asserting that job already paused.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-12-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 67a066fbe4070449fb63a5d44ae2e78a05a1e53d
      
https://github.com/qemu/qemu/commit/67a066fbe4070449fb63a5d44ae2e78a05a1e53d
  Author: Max Reitz <mreitz@redhat.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M tests/qemu-iotests/129

  Log Message:
  -----------
  iotests/129: Limit backup's max-chunk/max-workers

Right now, this does not change anything, because backup ignores
max-chunk and max-workers.  However, as soon as backup is switched over
to block-copy for the background copying process, we will need it to
keep 129 passing.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210120102043.28346-1-mreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>


  Commit: 61623f82153788e9973a2479287328f0af27cbd0
      
https://github.com/qemu/qemu/commit/61623f82153788e9973a2479287328f0af27cbd0
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M tests/qemu-iotests/185
    M tests/qemu-iotests/185.out

  Log Message:
  -----------
  iotests: 185: prepare for backup over block-copy

The further change of moving backup to be a one block-copy call will
make copying chunk-size and cluster-size two separate things. So, even
with 64k cluster sized qcow2 image, default chunk would be 1M.
185 test however assumes, that with speed limited to 64K, one iteration
would result in offset=64K. It will change, as first iteration would
result in offset=1M independently of speed.

So, let's explicitly specify, what test wants: set max-chunk to 64K, so
that one iteration is 64K. Note, that we don't need to limit
max-workers, as block-copy rate limiter will handle the situation and
wouldn't start new workers when speed limit is obviously reached.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-13-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 34a5de525a884f8187b3987e690ef7bc8559b2ce
      
https://github.com/qemu/qemu/commit/34a5de525a884f8187b3987e690ef7bc8559b2ce
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M tests/qemu-iotests/219

  Log Message:
  -----------
  iotests: 219: prepare for backup over block-copy

The further change of moving backup to be a one block-copy call will
make copying chunk-size and cluster-size two separate things. So, even
with 64k cluster sized qcow2 image, default chunk would be 1M.
Test 219 depends on specified chunk-size. Update it for explicit
chunk-size for backup as for mirror.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-14-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 2d0f32e3fc160ee03c46daf4545371eeb836c600
      
https://github.com/qemu/qemu/commit/2d0f32e3fc160ee03c46daf4545371eeb836c600
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M tests/qemu-iotests/257
    M tests/qemu-iotests/257.out

  Log Message:
  -----------
  iotests: 257: prepare for backup over block-copy

Iotest 257 dumps a lot of in-progress information of backup job, such
as offset and bitmap dirtiness. Further commit will move backup to be
one block-copy call, which will introduce async parallel requests
instead of plain cluster-by-cluster copying. To keep things
deterministic, allow only one worker (only one copy request at a time)
for this test.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-15-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: d51590fc3eb0589e0e82ed960da976d0442e662a
      
https://github.com/qemu/qemu/commit/d51590fc3eb0589e0e82ed960da976d0442e662a
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/block-copy.c

  Log Message:
  -----------
  block/block-copy: make progress_bytes_callback optional

We are going to stop use of this callback in the following commit.
Still the callback handling code will be dropped in a separate commit.
So, for now let's make it optional.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-16-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 511e7d31bf107aca331ab834f71c90267f803960
      
https://github.com/qemu/qemu/commit/511e7d31bf107aca331ab834f71c90267f803960
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/backup.c

  Log Message:
  -----------
  block/backup: drop extra gotos from backup_run()

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-17-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 71eed4cebed487a4f3c9f97aba83c611bbe22f8d
      
https://github.com/qemu/qemu/commit/71eed4cebed487a4f3c9f97aba83c611bbe22f8d
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/backup.c

  Log Message:
  -----------
  backup: move to block-copy

This brings async request handling and block-status driven chunk sizes
to backup out of the box, which improves backup performance.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-18-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 6a30f663d4c0b3c45a544d541e0c4e214b2473a1
      
https://github.com/qemu/qemu/commit/6a30f663d4c0b3c45a544d541e0c4e214b2473a1
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M blockdev.c
    M qapi/block-core.json

  Log Message:
  -----------
  qapi: backup: disable copy_range by default

Further commit will add a benchmark
(scripts/simplebench/bench-backup.py), which will show that backup
works better with async parallel requests (previous commit) and
disabled copy_range. So, let's disable copy_range by default.

Note: the option was added several commits ago with default to true,
to follow old behavior (the feature was enabled unconditionally), and
only now we are going to change the default behavior.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-19-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 5b49c2bdc1307bc9c96c598cfe52a352f834c149
      
https://github.com/qemu/qemu/commit/5b49c2bdc1307bc9c96c598cfe52a352f834c149
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/block-copy.c
    M include/block/block-copy.h

  Log Message:
  -----------
  block/block-copy: drop unused block_copy_set_progress_callback()

Drop unused code.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-20-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 143a6384f5ecb7c660c6d5d2622993c49bfbfa5d
      
https://github.com/qemu/qemu/commit/143a6384f5ecb7c660c6d5d2622993c49bfbfa5d
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/backup-top.c
    M block/block-copy.c
    M include/block/block-copy.h

  Log Message:
  -----------
  block/block-copy: drop unused argument of block_copy()

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-21-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 2096de521edfe8677308a7419bc61faa108f242a
      
https://github.com/qemu/qemu/commit/2096de521edfe8677308a7419bc61faa108f242a
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M scripts/simplebench/bench_block_job.py

  Log Message:
  -----------
  simplebench/bench_block_job: use correct shebang line with python3

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-22-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: b2fcb0c5754c2554b8406376e99a75e9e0a6b7bd
      
https://github.com/qemu/qemu/commit/b2fcb0c5754c2554b8406376e99a75e9e0a6b7bd
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M scripts/simplebench/bench-example.py
    M scripts/simplebench/bench_block_job.py

  Log Message:
  -----------
  simplebench: bench_block_job: add cmd_options argument

Add argument to allow additional block-job options.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-23-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: c701f59253c7b69f51364c04e55278e38364738e
      
https://github.com/qemu/qemu/commit/c701f59253c7b69f51364c04e55278e38364738e
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    A scripts/simplebench/bench-backup.py

  Log Message:
  -----------
  simplebench: add bench-backup.py

Add script to benchmark new backup architecture.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20210116214705.822267-24-vsementsov@virtuozzo.com>
[mreitz: s/not unsupported/not supported/]
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 797e3e380534bddad32121bfc980a39cc3dd2c96
      
https://github.com/qemu/qemu/commit/797e3e380534bddad32121bfc980a39cc3dd2c96
  Author: David Edmondson <david.edmondson@oracle.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block/file-posix.c

  Log Message:
  -----------
  block: report errno when flock fcntl fails

When a call to fcntl(2) for the purpose of adding file locks fails
with an error other than EAGAIN or EACCES, report the error returned
by fcntl.

EAGAIN or EACCES are elided as they are considered to be common
failures, indicating that a conflicting lock is held by another
process.

No errors are elided when removing file locks.

Signed-off-by: David Edmondson <david.edmondson@oracle.com>
Message-Id: <20210113164447.2545785-1-david.edmondson@oracle.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 0f46147e10db2b87151083525c34ec18dd55e91f
      
https://github.com/qemu/qemu/commit/0f46147e10db2b87151083525c34ec18dd55e91f
  Author: Alberto Garcia <berto@igalia.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    A tests/qemu-iotests/313
    A tests/qemu-iotests/313.out
    M tests/qemu-iotests/group

  Log Message:
  -----------
  iotests: Add test for the regression fixed in c8bf9a9169

Signed-off-by: Alberto Garcia <berto@igalia.com>
Suggested-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20210112170540.2912-1-berto@igalia.com>
[mreitz: Add "# group:" line]
Signed-off-by: Max Reitz <mreitz@redhat.com>


  Commit: 014bb4b0e545b70f903adcdf6f118351b7cfaf7b
      
https://github.com/qemu/qemu/commit/014bb4b0e545b70f903adcdf6f118351b7cfaf7b
  Author: Max Reitz <mreitz@redhat.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M tests/qemu-iotests/118
    M tests/qemu-iotests/118.out

  Log Message:
  -----------
  iotests/118: Drop 'change' test

Commit 0afec75734331 removed the 'change' QMP command, so we can no
longer test it in 118.

Fixes: 0afec75734331a0b52fa3aa4235220eda8c7846f
       ('qmp: remove deprecated "change" command')
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210126104833.57026-1-mreitz@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>


  Commit: bb24cdc5efee580e81f71c5ff0fd980f2cc179d0
      
https://github.com/qemu/qemu/commit/bb24cdc5efee580e81f71c5ff0fd980f2cc179d0
  Author: Max Reitz <mreitz@redhat.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M tests/qemu-iotests/178
    M tests/qemu-iotests/178.out.qcow2
    M tests/qemu-iotests/178.out.raw

  Log Message:
  -----------
  iotests/178: Pass value to invalid option

ccd3b3b8112 has deprecated short-hand boolean options (i.e., options
with values).  All options without values are interpreted as boolean
options, so this includes the invalid option "snapshot.foo" used in
iotest 178.

So after ccd3b3b8112, 178 fails with:

  +qemu-img: warning: short-form boolean option 'snapshot.foo' deprecated
  +Please use snapshot.foo=on instead

Suppress that deprecation warning by passing some value to it (it does
not matter which, because the option is invalid anyway).

Fixes: ccd3b3b8112b670fdccf8a392b8419b173ffccb4
       ("qemu-option: warn for short-form boolean options")
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210126123834.115915-1-mreitz@redhat.com>


  Commit: 565c86af519aa7f4e80622432a053c2a65a9b80e
      
https://github.com/qemu/qemu/commit/565c86af519aa7f4e80622432a053c2a65a9b80e
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M block.c
    M block/backup-top.c
    M block/backup-top.h
    M block/backup.c
    M block/block-copy.c
    M block/copy-on-read.c
    A block/copy-on-read.h
    M block/file-posix.c
    M block/io.c
    M block/monitor/block-hmp-cmds.c
    M block/replication.c
    M block/stream.c
    M blockdev.c
    M blockjob.c
    M include/block/block-copy.h
    M include/block/block.h
    M include/block/block_int.h
    M include/block/blockjob_int.h
    M job.c
    M qapi/block-core.json
    A scripts/simplebench/bench-backup.py
    M scripts/simplebench/bench-example.py
    M scripts/simplebench/bench_block_job.py
    M tests/qemu-iotests/030
    M tests/qemu-iotests/056
    M tests/qemu-iotests/109.out
    M tests/qemu-iotests/118
    M tests/qemu-iotests/118.out
    M tests/qemu-iotests/124
    M tests/qemu-iotests/129
    M tests/qemu-iotests/141.out
    M tests/qemu-iotests/178
    M tests/qemu-iotests/178.out.qcow2
    M tests/qemu-iotests/178.out.raw
    M tests/qemu-iotests/185
    M tests/qemu-iotests/185.out
    M tests/qemu-iotests/219
    M tests/qemu-iotests/245
    M tests/qemu-iotests/257
    M tests/qemu-iotests/257.out
    M tests/qemu-iotests/297
    M tests/qemu-iotests/297.out
    M tests/qemu-iotests/300
    A tests/qemu-iotests/310
    A tests/qemu-iotests/310.out
    A tests/qemu-iotests/313
    A tests/qemu-iotests/313.out
    M tests/qemu-iotests/common.rc
    M tests/qemu-iotests/group
    M tests/qemu-iotests/iotests.py
    M util/coroutine-sigaltstack.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2021-01-26' 
into staging

Block patches:
- Make backup block jobs use asynchronous requests with the block-copy
  module
- Use COR filter node for stream block jobs
- Make coroutine-sigaltstack’s qemu_coroutine_new() function thread-safe
- Report error string when file locking fails with an unexpected errno
- iotest fixes, additions, and some refactoring

# gpg: Signature made Tue 26 Jan 2021 14:16:59 GMT
# gpg:                using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40
# gpg:                issuer "mreitz@redhat.com"
# gpg: Good signature from "Max Reitz <mreitz@redhat.com>" [full]
# Primary key fingerprint: 91BE B60A 30DB 3E88 57D1  1829 F407 DB00 61D5 CF40

* remotes/maxreitz/tags/pull-block-2021-01-26: (53 commits)
  iotests/178: Pass value to invalid option
  iotests/118: Drop 'change' test
  iotests: Add test for the regression fixed in c8bf9a9169
  block: report errno when flock fcntl fails
  simplebench: add bench-backup.py
  simplebench: bench_block_job: add cmd_options argument
  simplebench/bench_block_job: use correct shebang line with python3
  block/block-copy: drop unused argument of block_copy()
  block/block-copy: drop unused block_copy_set_progress_callback()
  qapi: backup: disable copy_range by default
  backup: move to block-copy
  block/backup: drop extra gotos from backup_run()
  block/block-copy: make progress_bytes_callback optional
  iotests: 257: prepare for backup over block-copy
  iotests: 219: prepare for backup over block-copy
  iotests: 185: prepare for backup over block-copy
  iotests/129: Limit backup's max-chunk/max-workers
  iotests: 56: prepare for backup over block-copy
  qapi: backup: add max-chunk and max-workers to x-perf struct
  job: call job_enter from job_pause
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/9cd69f1a2702...565c86af519a



reply via email to

[Prev in Thread] Current Thread [Next in Thread]