qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] Protect the block layer with a rwlock: part 2
@ 2022-11-16 13:53 Emanuele Giuseppe Esposito
  2022-11-16 13:53 ` [PATCH 1/6] block: assert that bdrv_co_create is always called with graph rdlock taken Emanuele Giuseppe Esposito
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Emanuele Giuseppe Esposito @ 2022-11-16 13:53 UTC (permalink / raw)
  To: qemu-block
  Cc: Kevin Wolf, Hanna Reitz, John Snow, Paolo Bonzini,
	Vladimir Sementsov-Ogievskiy, Stefan Hajnoczi, Fam Zheng,
	Eric Blake, qemu-devel, Emanuele Giuseppe Esposito

Please read "Protect the block layer with a rwlock: part 1" for an additional
introduction and aim of this series.

This second part aims to add the graph rdlock to the BlockDriver functions
that already run in coroutine context and are classified as IO.
Such functions will recursively traverse the BlockDriverState graph, therefore
they need to be protected with the rdlock.

Based-on: <20221116134850.3051419-1-eesposit@redhat.com>

Thank you,
Emanuele

Emanuele Giuseppe Esposito (6):
  block: assert that bdrv_co_create is always called with graph rdlock
    taken
  block: assert that BlockDriver->bdrv_co_{amend/create} are called with
    graph rdlock taken
  block: assert that BlockDriver->bdrv_co_copy_range_{from/to} is always
    called with graph rdlock taken
  block/dirty-bitmap: assert that BlockDriver->bdrv_co_*_dirty_bitmap
    are always called with graph rdlock taken
  block/io: assert that BlockDriver->bdrv_co_*_snapshot_* are always
    called with graph rdlock taken
  block: assert that BlockDriver->bdrv_co_delete_file is always called
    with graph rdlock taken

 block.c                          |  2 ++
 block/amend.c                    |  1 +
 block/block-backend.c            |  2 ++
 block/create.c                   |  1 +
 block/dirty-bitmap.c             |  2 ++
 block/io.c                       |  7 +++++++
 include/block/block_int-common.h | 14 +++++++++++++-
 qemu-img.c                       |  4 +++-
 8 files changed, 31 insertions(+), 2 deletions(-)

-- 
2.31.1



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-11-21 15:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-16 13:53 [PATCH 0/6] Protect the block layer with a rwlock: part 2 Emanuele Giuseppe Esposito
2022-11-16 13:53 ` [PATCH 1/6] block: assert that bdrv_co_create is always called with graph rdlock taken Emanuele Giuseppe Esposito
2022-11-16 13:53 ` [PATCH 2/6] block: assert that BlockDriver->bdrv_co_{amend/create} are " Emanuele Giuseppe Esposito
2022-11-16 13:53 ` [PATCH 3/6] block: assert that BlockDriver->bdrv_co_copy_range_{from/to} is always " Emanuele Giuseppe Esposito
2022-11-16 13:53 ` [PATCH 4/6] block/dirty-bitmap: assert that BlockDriver->bdrv_co_*_dirty_bitmap are " Emanuele Giuseppe Esposito
2022-11-16 13:53 ` [PATCH 5/6] block/io: assert that BlockDriver->bdrv_co_*_snapshot_* " Emanuele Giuseppe Esposito
2022-11-16 13:53 ` [PATCH 6/6] block: assert that BlockDriver->bdrv_co_delete_file is " Emanuele Giuseppe Esposito
2022-11-21 15:02 ` [PATCH 0/6] Protect the block layer with a rwlock: part 2 Emanuele Giuseppe Esposito

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).