qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 11cea4: block: add configure options for excl


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 11cea4: block: add configure options for excluding vmdk, v...
Date: Wed, 10 May 2023 08:42:16 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 11cea42e176bebc5e85866b01ade4a86651b7633
      
https://github.com/qemu/qemu/commit/11cea42e176bebc5e85866b01ade4a86651b7633
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M block/meson.build
    M meson.build
    M meson_options.txt
    M scripts/meson-buildoptions.sh

  Log Message:
  -----------
  block: add configure options for excluding vmdk, vhdx and vpc

Let's add --enable / --disable configure options for these formats,
so that those who don't need them may not build them.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-Id: <20230421092758.814122-1-vsementsov@yandex-team.ru>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 17ac39c3e726173f737bb6cd898c160b406532d4
      
https://github.com/qemu/qemu/commit/17ac39c3e726173f737bb6cd898c160b406532d4
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M block/mirror.c
    M include/block/graph-lock.h

  Log Message:
  -----------
  block: add missing coroutine_fn annotations

After the recent introduction of many new coroutine callbacks,
a couple calls from non-coroutine_fn to coroutine_fn have sneaked
in; fix them.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20230406101752.242125-1-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 3edf660a9155848d1d7bc6ad2586ceb0285105e3
      
https://github.com/qemu/qemu/commit/3edf660a9155848d1d7bc6ad2586ceb0285105e3
  Author: Stefan Hajnoczi <stefanha@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M hw/block/dataplane/virtio-blk.c
    M hw/scsi/virtio-scsi-dataplane.c
    M include/block/aio-wait.h
    M util/aio-wait.c

  Log Message:
  -----------
  aio-wait: avoid AioContext lock in aio_wait_bh_oneshot()

There is no need for the AioContext lock in aio_wait_bh_oneshot().
It's easy to remove the lock from existing callers and then switch from
AIO_WAIT_WHILE() to AIO_WAIT_WHILE_UNLOCKED() in aio_wait_bh_oneshot().

Document that the AioContext lock should not be held across
aio_wait_bh_oneshot(). Holding a lock across aio_poll() can cause
deadlock so we don't want callers to do that.

This is a step towards getting rid of the AioContext lock.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230404153307.458883-1-stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: e2626874a32602d4e52971c786ef5ffb4430629d
      
https://github.com/qemu/qemu/commit/e2626874a32602d4e52971c786ef5ffb4430629d
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  block: Fix use after free in blockdev_mark_auto_del()

job_cancel_locked() drops the job list lock temporarily and it may call
aio_poll(). We must assume that the list has changed after this call.
Also, with unlucky timing, it can end up freeing the job during
job_completed_txn_abort_locked(), making the job pointer invalid, too.

For both reasons, we can't just continue at block_job_next_locked(job).
Instead, start at the head of the list again after job_cancel_locked()
and skip those jobs that we already cancelled (or that are completing
anyway).

Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20230503140142.474404-1-kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: cf6052f111f8d6a2ef083f3e2848bc6f8180bb96
      
https://github.com/qemu/qemu/commit/cf6052f111f8d6a2ef083f3e2848bc6f8180bb96
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M tests/qemu-iotests/tests/nbd-reconnect-on-open
    M tests/qemu-iotests/tests/nbd-reconnect-on-open.out

  Log Message:
  -----------
  iotests/nbd-reconnect-on-open: Fix NBD socket path

Socket paths need to be short to avoid failures. This is why there is a
iotests.sock_dir (defaulting to /tmp) separate from the disk image base
directory.

Make use of it to fix failures in too deeply nested test directories.

Fixes: ab7f7e67a7e7b49964109501dfcde4ec29bae60e
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20230503165019.8867-1-kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 6dab4c93ecfae48e2e67b984d1032c1e988d3005
      
https://github.com/qemu/qemu/commit/6dab4c93ecfae48e2e67b984d1032c1e988d3005
  Author: Eric Blake <eblake@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: Attempt disk reactivation in more failure scenarios

Commit fe904ea824 added a fail_inactivate label, which tries to
reactivate disks on the source after a failure while s->state ==
MIGRATION_STATUS_ACTIVE, but didn't actually use the label if
qemu_savevm_state_complete_precopy() failed.  This failure to
reactivate is also present in commit 6039dd5b1c (also covering the new
s->state == MIGRATION_STATUS_DEVICE state) and 403d18ae (ensuring
s->block_inactive is set more reliably).

Consolidate the two labels back into one - no matter HOW migration is
failed, if there is any chance we can reach vm_start() after having
attempted inactivation, it is essential that we have tried to restart
disks before then.  This also makes the cleanup more like
migrate_fd_cancel().

Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20230502205212.134680-1-eblake@redhat.com>
Acked-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 0050c163ff6d8167e07c9fc4be7f728316140cb6
      
https://github.com/qemu/qemu/commit/0050c163ff6d8167e07c9fc4be7f728316140cb6
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M block/qcow2-refcount.c
    M block/qcow2.c
    M block/qcow2.h

  Log Message:
  -----------
  qcow2: Don't call bdrv_getlength() in coroutine_fns

There is a bdrv_co_getlength() now, which should be used in coroutine
context.

This requires adding GRAPH_RDLOCK to some functions so that this still
compiles with TSA because bdrv_co_getlength() is GRAPH_RDLOCK.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230504115750.54437-2-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: da4afaff074e56b0fa0d25abf865784148018895
      
https://github.com/qemu/qemu/commit/da4afaff074e56b0fa0d25abf865784148018895
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M block/block-backend.c
    M include/block/block-global-state.h

  Log Message:
  -----------
  block: Consistently call bdrv_activate() outside coroutine

Migration code can call bdrv_activate() in coroutine context, whereas
other callers call it outside of coroutines. As it calls other code that
is not supposed to run in coroutines, standardise on running outside of
coroutines.

This adds a no_co_wrapper to switch to the main loop before calling
bdrv_activate().

Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230504115750.54437-3-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: b2ab5f545fa1eaaf2955dd617bee19a8b3279786
      
https://github.com/qemu/qemu/commit/b2ab5f545fa1eaaf2955dd617bee19a8b3279786
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M block.c
    M block/crypto.c
    M block/parallels.c
    M block/qcow.c
    M block/qcow2.c
    M block/qed.c
    M block/vdi.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M include/block/block-global-state.h
    M include/sysemu/block-backend-global-state.h

  Log Message:
  -----------
  block: bdrv/blk_co_unref() for calls in coroutine context

These functions must not be called in coroutine context, because they
need write access to the graph.

Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230504115750.54437-4-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 0c7d204f50c382c6baac8c94bd57af4a022b3888
      
https://github.com/qemu/qemu/commit/0c7d204f50c382c6baac8c94bd57af4a022b3888
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  block: Don't call no_coroutine_fns in qmp_block_resize()

This QMP handler runs in a coroutine, so it must use the corresponding
no_co_wrappers instead.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2185688
Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230504115750.54437-5-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: e113362e4cdfdcfe1d497e569527f70a0021333a
      
https://github.com/qemu/qemu/commit/e113362e4cdfdcfe1d497e569527f70a0021333a
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    A tests/qemu-iotests/tests/iothreads-resize
    A tests/qemu-iotests/tests/iothreads-resize.out

  Log Message:
  -----------
  iotests: Test resizing image attached to an iothread

This tests that trying to resize an image with QMP block_resize doesn't
hang or otherwise fail when the image is attached to a device running in
an iothread.

This is a regression test for the recent fix that changed
qmp_block_resize, which is a coroutine based QMP handler, to avoid
calling no_coroutine_fns directly.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20230509134133.373408-1-kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 57f3d07b18a46cff4bc9dbb0a36173ef5b7420a3
      
https://github.com/qemu/qemu/commit/57f3d07b18a46cff4bc9dbb0a36173ef5b7420a3
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M tests/unit/test-bdrv-drain.c

  Log Message:
  -----------
  test-bdrv-drain: Don't modify the graph in coroutines

test-bdrv-drain contains a few test cases that are run both in coroutine
and non-coroutine context. Running the entire code including the setup
and shutdown in coroutines is incorrect because graph modifications can
generally not happen in coroutines.

Change the test so that creating and destroying the test nodes and
BlockBackends always happens outside of coroutine context.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20230504115750.54437-6-kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: d51c349b642d2c50611085db521cf31f5f985488
      
https://github.com/qemu/qemu/commit/d51c349b642d2c50611085db521cf31f5f985488
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M include/block/graph-lock.h

  Log Message:
  -----------
  graph-lock: Add GRAPH_UNLOCKED(_PTR)

For some functions, it is part of their interface to be called without
holding the graph lock. Add a new macro to document this.

The macro expands to TSA_EXCLUDES(), which is a relatively weak check
because it passes in cases where the compiler just doesn't know if the
lock is held. Function pointers can't be checked at all. Therefore, its
primary purpose is documentation.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230504115750.54437-7-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 4ee1f854ecbe81492e913bd7699091266992fee7
      
https://github.com/qemu/qemu/commit/4ee1f854ecbe81492e913bd7699091266992fee7
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M include/block/graph-lock.h

  Log Message:
  -----------
  graph-lock: Fix GRAPH_RDLOCK_GUARD*() to be reader lock

GRAPH_RDLOCK_GUARD() and GRAPH_RDLOCK_GUARD_MAINLOOP() only take a
reader lock for the graph, so the correct annotation for them to use is
TSA_ASSERT_SHARED rather than TSA_ASSERT.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20230504115750.54437-8-kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 1a30b0f5d76f842576de2ab9a29ab9e8a7c9eb09
      
https://github.com/qemu/qemu/commit/1a30b0f5d76f842576de2ab9a29ab9e8a7c9eb09
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M block.c
    M block/qcow2.c
    M block/qed.c
    M include/block/block_int-common.h

  Log Message:
  -----------
  block: .bdrv_open is non-coroutine and unlocked

Drivers were a bit confused about whether .bdrv_open can run in a
coroutine and whether or not it holds a graph lock.

It cannot keep a graph lock from the caller across the whole function
because it both changes the graph (requires a writer lock) and does I/O
(requires a reader lock). Therefore, it should take these locks
internally as needed.

The functions used to be called in coroutine context during image
creation. This was buggy for other reasons, and as of commit 32192301,
all block drivers go through no_co_wrappers. So it is not called in
coroutine context any more.

Fix qcow2 and qed to work with the correct assumptions: The graph lock
needs to be taken internally instead of just assuming it's already
there, and the coroutine path is dead code that can be removed.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230504115750.54437-9-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 5d934513f8ca21f48709103991099c25f7bf9f6c
      
https://github.com/qemu/qemu/commit/5d934513f8ca21f48709103991099c25f7bf9f6c
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M block/nbd.c

  Log Message:
  -----------
  nbd: Remove nbd_co_flush() wrapper function

The only thing nbd_co_flush() does is call nbd_client_co_flush(). Just
use that function directly in the BlockDriver definitions and remove the
wrapper.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230504115750.54437-10-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 69aa0d371f67b1c042ed4f3ff4a481d561b54d21
      
https://github.com/qemu/qemu/commit/69aa0d371f67b1c042ed4f3ff4a481d561b54d21
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M block/coroutines.h
    M block/nbd.c

  Log Message:
  -----------
  nbd: Mark nbd_co_do_establish_connection() and callers GRAPH_RDLOCK

This adds GRAPH_RDLOCK annotations to declare that callers of
nbd_co_do_establish_connection() need to hold a reader lock for the
graph.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230504115750.54437-11-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 622d30af9930e9eb791cf6344633c256e328a7ef
      
https://github.com/qemu/qemu/commit/622d30af9930e9eb791cf6344633c256e328a7ef
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M block/vhdx.c

  Log Message:
  -----------
  vhdx: Require GRAPH_RDLOCK for accessing a node's parent list

This adds GRAPH_RDLOCK annotations to declare that functions accessing
the parent list of a node need to hold a reader lock for the graph. As
it happens, they already do.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230504115750.54437-12-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 9c93652da6784314519968c65c05fcaccfe56193
      
https://github.com/qemu/qemu/commit/9c93652da6784314519968c65c05fcaccfe56193
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  mirror: Require GRAPH_RDLOCK for accessing a node's parent list

This adds GRAPH_RDLOCK annotations to declare that functions accessing
the parent list of a node need to hold a reader lock for the graph. As
it happens, they already do.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20230504115750.54437-13-kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: de335638a399b614d510b978b5c6d1b237e0ac79
      
https://github.com/qemu/qemu/commit/de335638a399b614d510b978b5c6d1b237e0ac79
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

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

  Log Message:
  -----------
  block: Mark bdrv_co_get_allocated_file_size() and callers GRAPH_RDLOCK

This adds GRAPH_RDLOCK annotations to declare that callers of
bdrv_co_get_allocated_file_size() need to hold a reader lock for the
graph.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20230504115750.54437-14-kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: a00e70c01241590b6c80dca4ee39b9de0b10097e
      
https://github.com/qemu/qemu/commit/a00e70c01241590b6c80dca4ee39b9de0b10097e
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M block.c
    M block/crypto.c
    M block/io.c
    M block/mirror.c
    M block/raw-format.c
    M include/block/block-io.h
    M include/block/block_int-common.h

  Log Message:
  -----------
  block: Mark bdrv_co_get_info() and callers GRAPH_RDLOCK

This adds GRAPH_RDLOCK annotations to declare that callers of
bdrv_co_get_info() need to hold a reader lock for the graph.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230504115750.54437-15-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: cb2bfaa450dd65b717e27c9090169be05bd73b93
      
https://github.com/qemu/qemu/commit/cb2bfaa450dd65b717e27c9090169be05bd73b93
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

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

  Log Message:
  -----------
  block: Mark bdrv_co_debug_event() GRAPH_RDLOCK

This adds GRAPH_RDLOCK annotations to declare that callers of
bdrv_co_debug_event() need to hold a reader lock for the graph.

Unfortunately we cannot use a co_wrapper_bdrv_rdlock (i.e. make the
coroutine wrapper a no_coroutine_fn), because the function is called
(using the BLKDBG_EVENT macro) by mixed functions that run both in
coroutine and non-coroutine context (for example many of the functions
in qcow2-cluster.c and qcow2-refcount.c).

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230504115750.54437-16-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 840428a2669c90f75cf0d26a06bdfe6f51755fae
      
https://github.com/qemu/qemu/commit/840428a2669c90f75cf0d26a06bdfe6f51755fae
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M block/amend.c
    M include/block/block_int-common.h

  Log Message:
  -----------
  block: Mark BlockDriver callbacks for amend job GRAPH_RDLOCK

This adds GRAPH_RDLOCK annotations to declare that callers of amend
callbacks in BlockDriver need to hold a reader lock for the graph.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230504115750.54437-17-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 6ec75a6a3ed9d6ff3161d1f97c497909906495bd
      
https://github.com/qemu/qemu/commit/6ec75a6a3ed9d6ff3161d1f97c497909906495bd
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M block/qapi.c

  Log Message:
  -----------
  block: Mark bdrv_query_bds_stats() and callers GRAPH_RDLOCK

This adds GRAPH_RDLOCK annotations to declare that callers of
bdrv_query_bds_stats() need to hold a reader lock for the graph because
it accesses the children list of a node.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230504115750.54437-18-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 4f0bef8b36eb33efbba0a216b233265d734bdbfb
      
https://github.com/qemu/qemu/commit/4f0bef8b36eb33efbba0a216b233265d734bdbfb
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M include/block/qapi.h
    M qemu-img.c

  Log Message:
  -----------
  block: Mark bdrv_query_block_graph_info() and callers GRAPH_RDLOCK

This adds GRAPH_RDLOCK annotations to declare that callers of
bdrv_query_block_graph_info() need to hold a reader lock for the graph
because it accesses the children list of a node.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230504115750.54437-19-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 533c6e4ee8885cb9e7c6ac36e8e9fa92bea64f97
      
https://github.com/qemu/qemu/commit/533c6e4ee8885cb9e7c6ac36e8e9fa92bea64f97
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M block/blkverify.c
    M block/mirror.c
    M block/quorum.c
    M blockdev.c
    M include/block/block-global-state.h
    M include/block/block_int-common.h
    M include/block/block_int-global-state.h

  Log Message:
  -----------
  block: Mark bdrv_recurse_can_replace() and callers GRAPH_RDLOCK

This adds GRAPH_RDLOCK annotations to declare that callers of
bdrv_recurse_can_replace() need to hold a reader lock for the graph
because it accesses the children list of a node.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230504115750.54437-20-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: e19b157f3c66c44e3b89cb50a2030f0187b968e9
      
https://github.com/qemu/qemu/commit/e19b157f3c66c44e3b89cb50a2030f0187b968e9
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M block.c
    M block/io.c
    M include/block/block-global-state.h
    M include/block/block_int-common.h

  Log Message:
  -----------
  block: Mark bdrv_refresh_limits() and callers GRAPH_RDLOCK

This adds GRAPH_RDLOCK annotations to declare that callers of
bdrv_refresh_limits() need to hold a reader lock for the graph because
it accesses the children list of a node.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230504115750.54437-21-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 58a2e3f5c37be02dac3086b81bdda9414b931edf
      
https://github.com/qemu/qemu/commit/58a2e3f5c37be02dac3086b81bdda9414b931edf
  Author: Stefan Hajnoczi <stefanha@redhat.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M block/graph-lock.c
    M configure
    M meson.build
    M meson_options.txt
    M scripts/meson-buildoptions.sh

  Log Message:
  -----------
  block: compile out assert_bdrv_graph_readable() by default

reader_count() is a performance bottleneck because the global
aio_context_list_lock mutex causes thread contention. Put this debugging
assertion behind a new ./configure --enable-debug-graph-lock option and
disable it by default.

The --enable-debug-graph-lock option is also enabled by the more general
--enable-debug option.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230501173443.153062-1-stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: caa9cbd566877b34e9abcc04d936116fc5e0ab28
      
https://github.com/qemu/qemu/commit/caa9cbd566877b34e9abcc04d936116fc5e0ab28
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M block.c
    M block/amend.c
    M block/blkverify.c
    M block/block-backend.c
    M block/coroutines.h
    M block/crypto.c
    M block/graph-lock.c
    M block/io.c
    M block/meson.build
    M block/mirror.c
    M block/nbd.c
    M block/parallels.c
    M block/qapi.c
    M block/qcow.c
    M block/qcow2-refcount.c
    M block/qcow2.c
    M block/qcow2.h
    M block/qed.c
    M block/quorum.c
    M block/raw-format.c
    M block/vdi.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M blockdev.c
    M configure
    M hw/block/dataplane/virtio-blk.c
    M hw/scsi/virtio-scsi-dataplane.c
    M include/block/aio-wait.h
    M include/block/block-global-state.h
    M include/block/block-io.h
    M include/block/block_int-common.h
    M include/block/block_int-global-state.h
    M include/block/graph-lock.h
    M include/block/qapi.h
    M include/sysemu/block-backend-global-state.h
    M meson.build
    M meson_options.txt
    M migration/migration.c
    M qemu-img.c
    M scripts/meson-buildoptions.sh
    A tests/qemu-iotests/tests/iothreads-resize
    A tests/qemu-iotests/tests/iothreads-resize.out
    M tests/qemu-iotests/tests/nbd-reconnect-on-open
    M tests/qemu-iotests/tests/nbd-reconnect-on-open.out
    M tests/unit/test-bdrv-drain.c
    M util/aio-wait.c

  Log Message:
  -----------
  Merge tag 'for-upstream' of https://repo.or.cz/qemu/kevin into staging

Block layer patches

- Graph locking, part 3 (more block drivers)
- Compile out assert_bdrv_graph_readable() by default
- Add configure options for vmdk, vhdx and vpc
- Fix use after free in blockdev_mark_auto_del()
- migration: Attempt disk reactivation in more failure scenarios
- Coroutine correctness fixes

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCAAvFiEE3D3rFZqa+V09dFb+fwmycsiPL9YFAmRbi6ERHGt3b2xmQHJl
# ZGhhdC5jb20ACgkQfwmycsiPL9Y66A//ZRk/0M6EZUJPAKG6m/XLTDNrOCNBZ1Tu
# kBGvxXsVQZMt4gGpBad4l2INN6IQKTIdIf+lK71EpxMPmFG6xK32btn38yywCAfQ
# lr1p5nR0Y/zSlT+XzP4yKy/CtQl6U0rkysmjCIk35bZc7uLy6eo4oFR4vmhRRt2M
# UGltB50/Nicx12YFufVjodbhv+apxTGwS2XHatmwqtjKeYReSz8mJHslEy6DvC8m
# ziNThD6YBy7hMktAhNaqUqtZD0OSWz66VMObco/4i2++sOAMZIspXQkjv3AjH74e
# lmgMhNc/xgJKPwFBPsj6F7dOKxwhdKD9jzZlx3yaBtAU18hpWX54QWuA3/CFlySc
# 5QbbqIstFTC8lqoRWThQrcHHRKbDBJCP4ImRXUIKhuPaxEzXA9zb3+f3QPTIjLSA
# KO7nxuSmO+tC7hQ1K9kAjRZHWlxxAk4clk+7UrK4UrWgGxfCUKgFg4Tyx7RrpwA6
# j4L5vwAY60LW74tikWe9xJx2QbdRoWBTTZhUyirbO7rLX1e8mS1nUWmtIsFSQxAq
# Z7nX7ygN0WEF+8qIsk3jTGaEeJoCM7+7B+X2RpSy0sftFjFYmybIiUgLMO7e+ozK
# rvUPnwlHAbGCVIJOKrUDj3cGt6k3/xnrTajUc7pCB3KKqG4pe+IlZuHyKIUMActb
# dBLaBnj0M2o=
# =hw9E
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 10 May 2023 01:18:41 PM BST
# gpg:                using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6
# gpg:                issuer "kwolf@redhat.com"
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full]

* tag 'for-upstream' of https://repo.or.cz/qemu/kevin: (28 commits)
  block: compile out assert_bdrv_graph_readable() by default
  block: Mark bdrv_refresh_limits() and callers GRAPH_RDLOCK
  block: Mark bdrv_recurse_can_replace() and callers GRAPH_RDLOCK
  block: Mark bdrv_query_block_graph_info() and callers GRAPH_RDLOCK
  block: Mark bdrv_query_bds_stats() and callers GRAPH_RDLOCK
  block: Mark BlockDriver callbacks for amend job GRAPH_RDLOCK
  block: Mark bdrv_co_debug_event() GRAPH_RDLOCK
  block: Mark bdrv_co_get_info() and callers GRAPH_RDLOCK
  block: Mark bdrv_co_get_allocated_file_size() and callers GRAPH_RDLOCK
  mirror: Require GRAPH_RDLOCK for accessing a node's parent list
  vhdx: Require GRAPH_RDLOCK for accessing a node's parent list
  nbd: Mark nbd_co_do_establish_connection() and callers GRAPH_RDLOCK
  nbd: Remove nbd_co_flush() wrapper function
  block: .bdrv_open is non-coroutine and unlocked
  graph-lock: Fix GRAPH_RDLOCK_GUARD*() to be reader lock
  graph-lock: Add GRAPH_UNLOCKED(_PTR)
  test-bdrv-drain: Don't modify the graph in coroutines
  iotests: Test resizing image attached to an iothread
  block: Don't call no_coroutine_fns in qmp_block_resize()
  block: bdrv/blk_co_unref() for calls in coroutine context
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/568992e3440f...caa9cbd56687



reply via email to

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