mbox series

[00/24] block: Graph locking part 6 (bs->file/backing)

Message ID 20231027155333.420094-1-kwolf@redhat.com (mailing list archive)
Headers show
Series block: Graph locking part 6 (bs->file/backing) | expand

Message

Kevin Wolf Oct. 27, 2023, 3:53 p.m. UTC
This series is pleasantly boring for the most part and results in a
GRAPH_RDLOCK_PTR annotation for bs->file and bs->backing.

Kevin Wolf (24):
  block: Mark bdrv_probe_blocksizes() and callers GRAPH_RDLOCK
  block: Mark bdrv_has_zero_init() and callers GRAPH_RDLOCK
  block: Mark bdrv_filter_bs() and callers GRAPH_RDLOCK
  block: Mark bdrv_root_attach_child() GRAPH_WRLOCK
  block: Mark block_job_add_bdrv() GRAPH_WRLOCK
  block: Mark bdrv_filter_or_cow_bs() and callers GRAPH_RDLOCK
  block: Mark bdrv_skip_implicit_filters() and callers GRAPH_RDLOCK
  block: Mark bdrv_skip_filters() and callers GRAPH_RDLOCK
  block: Mark bdrv_(un)freeze_backing_chain() and callers GRAPH_RDLOCK
  block: Mark bdrv_chain_contains() and callers GRAPH_RDLOCK
  block: Mark bdrv_filter_child() and callers GRAPH_RDLOCK
  block: Mark bdrv_cow_child() and callers GRAPH_RDLOCK
  block: Mark bdrv_set_backing_hd_drained() GRAPH_WRLOCK
  block: Inline bdrv_set_backing_noperm()
  block: Mark bdrv_replace_node_common() GRAPH_WRLOCK
  block: Mark bdrv_replace_node() GRAPH_WRLOCK
  block: Protect bs->backing with graph_lock
  blkverify: Add locking for request_fn
  block: Introduce bdrv_co_change_backing_file()
  block: Add missing GRAPH_RDLOCK annotations
  qcow2: Take locks for accessing bs->file
  vhdx: Take locks for accessing bs->file
  block: Take graph lock for most of .bdrv_open
  block: Protect bs->file with graph_lock

 block/copy-on-read.h                   |   3 +-
 block/parallels.h                      |   5 +-
 block/qcow2.h                          |  59 ++++----
 block/qed.h                            |   2 +-
 block/vhdx.h                           |   9 +-
 include/block/block-global-state.h     |  43 +++---
 include/block/block-io.h               |  10 +-
 include/block/block_int-common.h       |  31 ++--
 include/block/block_int-global-state.h |  16 ++-
 include/block/block_int-io.h           |  19 +--
 include/block/blockjob.h               |   5 +-
 include/block/blockjob_int.h           |   9 +-
 block.c                                | 188 ++++++++++++++-----------
 block/backup.c                         |  21 ++-
 block/blkdebug.c                       |  29 ++--
 block/blkreplay.c                      |   8 +-
 block/blkverify.c                      |  18 ++-
 block/block-backend.c                  |   5 +
 block/block-copy.c                     |  11 +-
 block/bochs.c                          |   4 +
 block/cloop.c                          |   4 +
 block/commit.c                         |  32 ++++-
 block/copy-before-write.c              |   6 +-
 block/copy-on-read.c                   |  19 ++-
 block/crypto.c                         |  10 ++
 block/dmg.c                            |  21 ++-
 block/filter-compress.c                |   5 +-
 block/io.c                             |   2 +
 block/mirror.c                         |  85 +++++++----
 block/monitor/block-hmp-cmds.c         |   3 +
 block/parallels-ext.c                  |  21 ++-
 block/parallels.c                      |  22 ++-
 block/preallocate.c                    |  27 +++-
 block/qcow.c                           |  13 +-
 block/qcow2-bitmap.c                   |  14 +-
 block/qcow2-cluster.c                  |  25 ++--
 block/qcow2.c                          |  38 +++--
 block/qed.c                            |  88 ++++++------
 block/raw-format.c                     |  36 +++--
 block/replication.c                    |  12 +-
 block/snapshot-access.c                |   5 +-
 block/stream.c                         |  48 +++++--
 block/throttle.c                       |   3 +
 block/vdi.c                            |  15 +-
 block/vhdx-log.c                       |  40 +++---
 block/vhdx.c                           |  37 +++--
 block/vmdk.c                           |  23 ++-
 block/vpc.c                            |   6 +-
 blockdev.c                             |  72 ++++++----
 blockjob.c                             |   6 +-
 migration/block-dirty-bitmap.c         |   4 +
 nbd/server.c                           |   6 +
 qemu-img.c                             |  31 +++-
 tests/unit/test-bdrv-drain.c           |  39 +++--
 tests/unit/test-bdrv-graph-mod.c       |  18 ++-
 55 files changed, 862 insertions(+), 469 deletions(-)