qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] eed325: mirror: Store MirrorOp.co for debugga


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] eed325: mirror: Store MirrorOp.co for debuggability
Date: Thu, 20 Feb 2020 06:15:13 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: eed325b92c3e68417121ea23f96e33af6a4654ed
      
https://github.com/qemu/qemu/commit/eed325b92c3e68417121ea23f96e33af6a4654ed
  Author: Kevin Wolf <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  mirror: Store MirrorOp.co for debuggability

If a coroutine is launched, but the coroutine pointer isn't stored
anywhere, debugging any problems inside the coroutine is quite hard.
Let's store the coroutine pointer of a mirror operation in MirrorOp to
have it available in the debugger.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 7e6c4ff792734e196c8ca82564c56b5e7c6288ca
      
https://github.com/qemu/qemu/commit/7e6c4ff792734e196c8ca82564c56b5e7c6288ca
  Author: Kevin Wolf <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  mirror: Don't let an operation wait for itself

mirror_wait_for_free_in_flight_slot() just picks a random operation to
wait for. However, when mirror_co_read() waits for free slots, its
MirrorOp is already in s->ops_in_flight, so if not enough slots are
immediately available, an operation can end up waiting for itself to
complete, which results in a hang.

Fix this by passing the current MirrorOp and skipping this operation
when picking an operation to wait for.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1794692
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 2d4b5256cf6a091bb6c3516661be11b9ec690f95
      
https://github.com/qemu/qemu/commit/2d4b5256cf6a091bb6c3516661be11b9ec690f95
  Author: Alberto Garcia <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M block/qcow2-threads.c
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: Fix alignment checks in encrypted images

I/O requests to encrypted media should be aligned to the sector size
used by the underlying encryption method, not to BDRV_SECTOR_SIZE.
Fortunately this doesn't break anything at the moment because
both existing QCRYPTO_BLOCK_*_SECTOR_SIZE have the same value as
BDRV_SECTOR_SIZE.

The checks in qcow2_co_preadv_encrypted() are also unnecessary because
they are repeated immediately afterwards in qcow2_co_encdec().

Signed-off-by: Alberto Garcia <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Daniel P. Berrangé <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 8475ea48544b313cf533312846a4899ddecb799c
      
https://github.com/qemu/qemu/commit/8475ea48544b313cf533312846a4899ddecb799c
  Author: Hikaru Nishida <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M block/vvfat.c

  Log Message:
  -----------
  block/vvfat: Do not unref qcow on closing backing bdrv

Before this commit, BDRVVVFATState.qcow is unrefed in write_target_close
on closing backing bdrv of vvfat. However, qcow bdrv is opend as a child
of vvfat in enable_write_target() so it will be also unrefed on closing
vvfat itself. This causes use-after-free of qcow on freeing vvfat which
has backing bdrv and qcow bdrv as children in this order because
bdrv_close(vvfat) tries to free qcow bdrv after freeing backing bdrv
as QLIST_FOREACH_SAFE() loop keeps next pointer, but BdrvChild of qcow
is already freed in bdrv_close(backing bdrv).

Signed-off-by: Hikaru Nishida <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: dea9052ef1ba12c83f17d394c70d7d710ea1dec9
      
https://github.com/qemu/qemu/commit/dea9052ef1ba12c83f17d394c70d7d710ea1dec9
  Author: Kevin Wolf <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M block/qcow2-refcount.c

  Log Message:
  -----------
  qcow2: update_refcount(): Reset old_table_index after qcow2_cache_put()

In the case that update_refcount() frees a refcount block, it evicts it
from the metadata cache. Before doing so, however, it returns the
currently used refcount block to the cache because it might be the same.
Returning the refcount block early means that we need to reset
old_table_index so that we reload the refcount block in the next
iteration if it is actually still in use.

Fixes: f71c08ea8e60f035485a512fd2af8908567592f0
Signed-off-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: c3b6658c1a5a3fb24d6c27b2594cf86146f75b22
      
https://github.com/qemu/qemu/commit/c3b6658c1a5a3fb24d6c27b2594cf86146f75b22
  Author: Kevin Wolf <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M block/qcow2-cluster.c

  Log Message:
  -----------
  qcow2: Fix qcow2_alloc_cluster_abort() for external data file

For external data file, cluster allocations return an offset in the data
file and are not refcounted. In this case, there is nothing to do for
qcow2_alloc_cluster_abort(). Freeing the same offset in the qcow2 file
is wrong and causes crashes in the better case or image corruption in
the worse case.

Signed-off-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: a0cf8daf77548786ced84d773f06fc70571c5d38
      
https://github.com/qemu/qemu/commit/a0cf8daf77548786ced84d773f06fc70571c5d38
  Author: Kevin Wolf <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

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

  Log Message:
  -----------
  iotests: Test copy offloading with external data file

This adds a test for 'qemu-img convert' with copy offloading where the
target image has an external data file. If the test hosts supports it,
it tests both the case where copy offloading is supported and the case
where it isn't (otherwise we just test unsupported twice).

More specifically, the case with unsupported copy offloading tests
qcow2_alloc_cluster_abort() with external data files.

Signed-off-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 5b1405db0fbe4c2600dbaa1a340110a3aecef173
      
https://github.com/qemu/qemu/commit/5b1405db0fbe4c2600dbaa1a340110a3aecef173
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M block/qcow2-bitmap.c

  Log Message:
  -----------
  block/qcow2-bitmap: Remove unneeded variable assignment

Fix warning reported by Clang static code analyzer:

    CC      block/qcow2-bitmap.o
  block/qcow2-bitmap.c:650:5: warning: Value stored to 'ret' is never read
      ret = -EINVAL;
      ^     ~~~~~~~

Fixes: 88ddffae8
Reported-by: Clang Static Analyzer
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Ján Tomko <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 248e3ffb66c27cf95623f965b61b0eb97a607441
      
https://github.com/qemu/qemu/commit/248e3ffb66c27cf95623f965b61b0eb97a607441
  Author: Kevin Wolf <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M qapi/block-core.json

  Log Message:
  -----------
  qapi: Document meaning of 'ignore' BlockdevOnError for jobs

It is not obvious what 'ignore' actually means for block jobs: It could
be continuing the job and returning success in the end despite the error
(no block job does this). It could also mean continuing and returning
failure in the end (this is what stream does). And it can mean retrying
the failed request later (this is what backup, commit and mirror do).

This (somewhat inconsistent) behaviour was introduced and described for
stream and mirror in commit 32c81a4a6ec. backup and commit were
introduced later and use the same model as mirror.

Signed-off-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Ján Tomko <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: d71e65ec1d08849a4e62a778ed4ea732621cea26
      
https://github.com/qemu/qemu/commit/d71e65ec1d08849a4e62a778ed4ea732621cea26
  Author: Kevin Wolf <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M block/commit.c

  Log Message:
  -----------
  commit: Remove unused bytes_written

The bytes_written variable is only ever written to, it serves no
purpose. This has actually been the case since the commit job was first
introduced in commit 747ff602636.

Signed-off-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Ján Tomko <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: c5507b4d55f1f2989d3c108be387f62ed092ddc0
      
https://github.com/qemu/qemu/commit/c5507b4d55f1f2989d3c108be387f62ed092ddc0
  Author: Kevin Wolf <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M block/commit.c

  Log Message:
  -----------
  commit: Fix argument order for block_job_error_action()

The block_job_error_action() error call in the commit job gives the
on_err and is_read arguments in the wrong order. Fix this.

(Of course, hard-coded is_read = false is wrong, too, but that's a
separate problem for a separate patch.)

Signed-off-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Ján Tomko <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 0c42e175fcc9d9ed888e4d7a30237ddf36454d19
      
https://github.com/qemu/qemu/commit/0c42e175fcc9d9ed888e4d7a30237ddf36454d19
  Author: Kevin Wolf <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M block/commit.c

  Log Message:
  -----------
  commit: Inline commit_populate()

commit_populate() is a very short function and only called in a single
place. Its return value doesn't tell us whether an error happened while
reading or writing, which would be necessary for sending the right data
in the BLOCK_JOB_ERROR QMP event.

Signed-off-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Ján Tomko <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 9ad1e79f3f9b102a9aa05053347cf9874c7bc909
      
https://github.com/qemu/qemu/commit/9ad1e79f3f9b102a9aa05053347cf9874c7bc909
  Author: Kevin Wolf <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M block/commit.c

  Log Message:
  -----------
  commit: Fix is_read for block_job_error_action()

block_job_error_action() needs to know if reading from the top node or
writing to the base node failed so that it can set the right 'operation'
in the BLOCK_JOB_ERROR QMP event.

Signed-off-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Ján Tomko <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 8faad1c7fbabec51223297a9477dbc0d2a7d0a24
      
https://github.com/qemu/qemu/commit/8faad1c7fbabec51223297a9477dbc0d2a7d0a24
  Author: Kevin Wolf <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

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

  Log Message:
  -----------
  commit: Expose on-error option in QMP

Now that the error handling in the common block job is fixed, we can
expose the on-error option in QMP instead of hard-coding it as 'report'
in qmp_block_commit().

This fulfills the promise that the old comment in that function made,
even if a bit later than expected: "This will be part of the QMP
command, if/when the BlockdevOnError change for blkmirror makes it in".

Signed-off-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Ján Tomko <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: d439848941531f11ca94b714b57881e6c0c5ed2a
      
https://github.com/qemu/qemu/commit/d439848941531f11ca94b714b57881e6c0c5ed2a
  Author: Kevin Wolf <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

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

  Log Message:
  -----------
  iotests: Test error handling policies with block-commit

This tests both read failure (from the top node) and write failure (to
the base node) for on-error=report/stop/ignore.

As block-commit actually starts two different types of block jobs
(mirror.c for committing the active later, commit.c for intermediate
layers), all tests are run for both cases.

Signed-off-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 0beab8119f5e9d98f4afd4c9b57935436fb54a0c
      
https://github.com/qemu/qemu/commit/0beab8119f5e9d98f4afd4c9b57935436fb54a0c
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Remove superfluous semicolons

Fixes: 132ada80c4a
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 74e4a8a9614a96a7b7e34778d33e1f05a30d312d
      
https://github.com/qemu/qemu/commit/74e4a8a9614a96a7b7e34778d33e1f05a30d312d
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M block/io_uring.c

  Log Message:
  -----------
  block/io_uring: Remove superfluous semicolon

Fixes: 6663a0a3376
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: ca08d937e886aea7b9ce2c05d41e5c1aeec07a9f
      
https://github.com/qemu/qemu/commit/ca08d937e886aea7b9ce2c05d41e5c1aeec07a9f
  Author: Max Reitz <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  blockdev: Allow external snapshots everywhere

There is no good reason why we would allow external snapshots only on
the first non-filter node in a chain.  Parent BDSs should not care
whether their child is replaced by a snapshot.  (If they do care, they
should announce that via freezing the chain, which is checked in
bdrv_append() through bdrv_set_backing_hd().)

Before we had bdrv_is_first_non_filter() here (since 212a5a8f095), there
was a special function bdrv_check_ext_snapshot() that allowed snapshots
by default, but block drivers could override this.  Only blkverify did
so, however.

It is not clear to me why blkverify would do so; maybe just so that the
testee block driver would not be replaced.  The introducing commit
f6186f49e2c does not explain why.  Maybe because 08b24cfe376 would have
been the correct solution?  (Which adds a .supports_backing check.)

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 7607074f429eeac94f7c9dd6adfb5a42b0d835ee
      
https://github.com/qemu/qemu/commit/7607074f429eeac94f7c9dd6adfb5a42b0d835ee
  Author: Max Reitz <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  blockdev: Allow resizing everywhere

Block nodes that do not allow resizing should not share BLK_PERM_RESIZE.
It does not matter whether they are the first non-filter in their chain
or not.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: a851ad4cacc57bae6161f95de836a43011f4b906
      
https://github.com/qemu/qemu/commit/a851ad4cacc57bae6161f95de836a43011f4b906
  Author: Max Reitz <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

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

  Log Message:
  -----------
  block: Drop bdrv_is_first_non_filter()

It is unused now.  (And it was ugly because it needed to explore all BDS
chains from the top.)

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: f718ca147dad5b03b4cb75952966e59e34616382
      
https://github.com/qemu/qemu/commit/f718ca147dad5b03b4cb75952966e59e34616382
  Author: Max Reitz <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M tests/qemu-iotests/041

  Log Message:
  -----------
  iotests: Let 041 use -blockdev for quorum children

Using -drive with default options means that a virtio-blk drive will be
created that has write access to the to-be quorum children.  Quorum
should have exclusive write access to them, so we should use -blockdev
instead.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 37a3791b380584949046af6b62b54869390616dc
      
https://github.com/qemu/qemu/commit/37a3791b380584949046af6b62b54869390616dc
  Author: Max Reitz <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M block/quorum.c

  Log Message:
  -----------
  quorum: Fix child permissions

Quorum cannot share WRITE or RESIZE on its children.  Presumably, it
only does so because as a filter, it seemed intuitively correct to point
its .bdrv_child_perm to bdrv_filter_default_perm().

However, it is not really a filter, and bdrv_filter_default_perm() does
not work for it, so we have to provide a custom .bdrv_child_perm
implementation.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 5d69b5ab85d30201c1f5ef34651ba910977fc583
      
https://github.com/qemu/qemu/commit/5d69b5ab85d30201c1f5ef34651ba910977fc583
  Author: Max Reitz <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

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

  Log Message:
  -----------
  block: Add bdrv_recurse_can_replace()

After a couple of follow-up patches, this function will replace
bdrv_recurse_is_first_non_filter() in check_to_replace_node().

bdrv_recurse_is_first_non_filter() is both not sufficiently specific for
check_to_replace_node() (it allows cases that should not be allowed,
like replacing child nodes of quorum with dissenting data that have more
parents than just quorum), and it is too restrictive (it is perfectly
fine to replace filters).

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 998a6b2fc55b42c066260a2f75aa11a07e128808
      
https://github.com/qemu/qemu/commit/998a6b2fc55b42c066260a2f75aa11a07e128808
  Author: Max Reitz <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M block/blkverify.c

  Log Message:
  -----------
  blkverify: Implement .bdrv_recurse_can_replace()

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: a3ed794b36a60f544efcf00d146b95e03a786954
      
https://github.com/qemu/qemu/commit/a3ed794b36a60f544efcf00d146b95e03a786954
  Author: Max Reitz <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M block/quorum.c

  Log Message:
  -----------
  quorum: Implement .bdrv_recurse_can_replace()

Signed-off-by: Max Reitz <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 810803a87ce88abd695f07f434d00e7cd1e122e2
      
https://github.com/qemu/qemu/commit/810803a87ce88abd695f07f434d00e7cd1e122e2
  Author: Max Reitz <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Use bdrv_recurse_can_replace()

Let check_to_replace_node() use the more specialized
bdrv_recurse_can_replace() instead of
bdrv_recurse_is_first_non_filter(), which is too restrictive (or, in the
case of quorum, sometimes not restrictive enough).

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 6b4907cf4279e55207fc3fede5686324464ee413
      
https://github.com/qemu/qemu/commit/6b4907cf4279e55207fc3fede5686324464ee413
  Author: Max Reitz <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M block.c
    M block/blkverify.c
    M block/copy-on-read.c
    M block/filter-compress.c
    M block/quorum.c
    M block/replication.c
    M block/throttle.c
    M include/block/block.h
    M include/block/block_int.h

  Log Message:
  -----------
  block: Remove bdrv_recurse_is_first_non_filter()

It no longer has any users.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 6e9cc0518113da423252a1fea328f27dc7bcf997
      
https://github.com/qemu/qemu/commit/6e9cc0518113da423252a1fea328f27dc7bcf997
  Author: Max Reitz <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  mirror: Double-check immediately before replacing

There is no guarantee that we can still replace the node we want to
replace at the end of the mirror job.  Double-check by calling
bdrv_recurse_can_replace().

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 3c7f75b3219e6bd59cd4c6867e695449048ac152
      
https://github.com/qemu/qemu/commit/3c7f75b3219e6bd59cd4c6867e695449048ac152
  Author: Max Reitz <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M block/quorum.c

  Log Message:
  -----------
  quorum: Stop marking it as a filter

Quorum is not a filter, for example because it cannot guarantee which of
its children will serve the next request.  Thus, any of its children may
differ from the data visible to quorum's parents.

We have other filters with multiple children, but they differ in this
aspect:

- blkverify quits the whole qemu process if its children differ.  As
  such, we can always skip it when we want to skip it (as a filter node)
  by going to any of its children.  Both have the same data.

- replication generally serves requests from bs->file, so this is its
  only actually filtered child.

- Block job filters currently only have one child, but they will
  probably get more children in the future.  Still, they will always
  have only one actually filtered child.

Having "filters" as a dedicated node category only makes sense if you
can skip them by going to a one fixed child that always shows the same
data as the filter node.  Quorum cannot fulfill this, so it is not a
filter.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 6644d0e6192b36cdf2902c9774e1afb8ab2e7223
      
https://github.com/qemu/qemu/commit/6644d0e6192b36cdf2902c9774e1afb8ab2e7223
  Author: Max Reitz <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M tests/qemu-iotests/155

  Log Message:
  -----------
  iotests: Use complete_and_wait() in 155

This way, we get to see errors during the completion phase.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 6a3d0f1e3fc6fa8c7d859951816858f3afc4a081
      
https://github.com/qemu/qemu/commit/6a3d0f1e3fc6fa8c7d859951816858f3afc4a081
  Author: Max Reitz <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

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

  Log Message:
  -----------
  iotests: Add VM.assert_block_path()

Signed-off-by: Max Reitz <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 5d016a69e32dab4d796db69c9776688637858602
      
https://github.com/qemu/qemu/commit/5d016a69e32dab4d796db69c9776688637858602
  Author: Max Reitz <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M tests/qemu-iotests/041

  Log Message:
  -----------
  iotests/041: Drop superfluous shutdowns

All tearDowns in 041 shutdown the VM.  Thus, test cases do not need to
do it themselves (unless they need the VM to be down for some
post-operation check).

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: c351afd6f3fe068ff370d872fae4ab096bba0e92
      
https://github.com/qemu/qemu/commit/c351afd6f3fe068ff370d872fae4ab096bba0e92
  Author: Max Reitz <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M tests/qemu-iotests/041

  Log Message:
  -----------
  iotests: Resolve TODOs in 041

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 89e2194524b3b503775fe62f507242227d89827c
      
https://github.com/qemu/qemu/commit/89e2194524b3b503775fe62f507242227d89827c
  Author: Max Reitz <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M tests/qemu-iotests/041

  Log Message:
  -----------
  iotests: Use self.image_len in TestRepairQuorum

041's TestRepairQuorum has its own image_len, no need to refer to
TestSingleDrive.  (This patch allows commenting out TestSingleDrive to
speed up 041 during test testing.)

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: a1da1878607adb9f5ab8e58e61ff987d90730fa9
      
https://github.com/qemu/qemu/commit/a1da1878607adb9f5ab8e58e61ff987d90730fa9
  Author: Max Reitz <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

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

  Log Message:
  -----------
  iotests: Add tests for invalid Quorum @replaces

Add two tests to see that you cannot replace a Quorum child with the
mirror job while the child is in use by a different parent.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: c45a88f4429d7a8f384b75f3fd3fed5138a6edca
      
https://github.com/qemu/qemu/commit/c45a88f4429d7a8f384b75f3fd3fed5138a6edca
  Author: Max Reitz <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

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

  Log Message:
  -----------
  iotests: Check that @replaces can replace filters

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 672f9d0df10a68a5c5f2b32cbc8284abf9f5ee18
      
https://github.com/qemu/qemu/commit/672f9d0df10a68a5c5f2b32cbc8284abf9f5ee18
  Author: Peter Maydell <address@hidden>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M block.c
    M block/blkverify.c
    M block/commit.c
    M block/copy-on-read.c
    M block/filter-compress.c
    M block/io_uring.c
    M block/mirror.c
    M block/qcow2-bitmap.c
    M block/qcow2-cluster.c
    M block/qcow2-refcount.c
    M block/qcow2-threads.c
    M block/qcow2.c
    M block/quorum.c
    M block/replication.c
    M block/throttle.c
    M block/vvfat.c
    M blockdev.c
    M include/block/block.h
    M include/block/block_int.h
    M qapi/block-core.json
    M tests/qemu-iotests/040
    M tests/qemu-iotests/040.out
    M tests/qemu-iotests/041
    M tests/qemu-iotests/041.out
    M tests/qemu-iotests/155
    M tests/qemu-iotests/244
    M tests/qemu-iotests/244.out
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging

Block layer patches:

- Fix check_to_replace_node()
- commit: Expose on-error option in QMP
- qcow2: Fix qcow2_alloc_cluster_abort() for external data file
- mirror: Fix deadlock
- vvfat: Fix segfault while closing read-write node
- Code cleanups

# gpg: Signature made Tue 18 Feb 2020 14:04:43 GMT
# gpg:                using RSA key 7F09B272C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>" [full]
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6

* remotes/kevin/tags/for-upstream: (36 commits)
  iotests: Check that @replaces can replace filters
  iotests: Add tests for invalid Quorum @replaces
  iotests: Use self.image_len in TestRepairQuorum
  iotests: Resolve TODOs in 041
  iotests/041: Drop superfluous shutdowns
  iotests: Add VM.assert_block_path()
  iotests: Use complete_and_wait() in 155
  quorum: Stop marking it as a filter
  mirror: Double-check immediately before replacing
  block: Remove bdrv_recurse_is_first_non_filter()
  block: Use bdrv_recurse_can_replace()
  quorum: Implement .bdrv_recurse_can_replace()
  blkverify: Implement .bdrv_recurse_can_replace()
  block: Add bdrv_recurse_can_replace()
  quorum: Fix child permissions
  iotests: Let 041 use -blockdev for quorum children
  block: Drop bdrv_is_first_non_filter()
  blockdev: Allow resizing everywhere
  blockdev: Allow external snapshots everywhere
  block/io_uring: Remove superfluous semicolon
  ...

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/6c599282f8ab...672f9d0df10a



reply via email to

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