All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/8] Refactor bdrv_try_set_aio_context using transactions
@ 2022-07-12 21:19 Emanuele Giuseppe Esposito
  2022-07-12 21:19 ` [RFC PATCH 1/8] block.c: assert bs->aio_context is written under BQL and drains Emanuele Giuseppe Esposito
                   ` (7 more replies)
  0 siblings, 8 replies; 30+ messages in thread
From: Emanuele Giuseppe Esposito @ 2022-07-12 21:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Hanna Reitz, John Snow, Stefan Hajnoczi,
	Paolo Bonzini, Vladimir Sementsov-Ogievskiy, qemu-block,
	Emanuele Giuseppe Esposito

The aim of this series is to reorganize bdrv_try_set_aio_context
and drop BDS ->set_aio_context and ->can_set_aio_ctx callbacks in
favour of a new one, ->change_aio_ctx.

More informations in patch 3 (which is also RFC, due to the doubts
I have with AioContext locks).

Patch 1 just add assertions in the code, 2 extends the transactions API to be able to add also transactions in the tail
of the list.
Patch 3 is the core of this series, and introduces the new callback.
It is marked as RFC and the reason is explained in the commit message.
Patches 4-5-6 implement ->change_aio_ctx in the various block, blockjob
and block-backend BDSes.
Patch 7 substitutes ->change_aio_ctx with the old callbacks, and
patch 8 takes care of deleting the old callbacks and unused code.

This series is based on "job: replace AioContext lock with job_mutex",
but just because it uses job_set_aio_context() introduced there.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Based-on: <20220706201533.289775-1-eesposit@redhat.com>

Emanuele Giuseppe Esposito (8):
  block.c: assert bs->aio_context is written under BQL and drains
  transactions: add tran_add_back
  RFC: block: use transactions as a replacement of
    ->{can_}set_aio_context()
  blockjob: implement .change_aio_ctx in child_job
  block: implement .change_aio_ctx in child_of_bds
  block-backend: implement .change_aio_ctx in child_root
  block: use the new _change_ API instead of _can_set_ and _set_
  block: remove all unused ->can_set_aio_ctx and ->set_aio_ctx callbacks

 block.c                            | 288 +++++++++++++++--------------
 block/block-backend.c              |  65 +++++--
 blockjob.c                         |  50 +++--
 include/block/block-global-state.h |  16 +-
 include/block/block_int-common.h   |   5 +-
 include/qemu/transactions.h        |   9 +
 util/transactions.c                |  29 ++-
 7 files changed, 266 insertions(+), 196 deletions(-)

-- 
2.31.1



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

end of thread, other threads:[~2022-07-25  8:37 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-12 21:19 [RFC PATCH 0/8] Refactor bdrv_try_set_aio_context using transactions Emanuele Giuseppe Esposito
2022-07-12 21:19 ` [RFC PATCH 1/8] block.c: assert bs->aio_context is written under BQL and drains Emanuele Giuseppe Esposito
2022-07-14 14:03   ` Hanna Reitz
2022-07-12 21:19 ` [RFC PATCH 2/8] transactions: add tran_add_back Emanuele Giuseppe Esposito
2022-07-14 15:13   ` Hanna Reitz
2022-07-18 16:20     ` Paolo Bonzini
2022-07-20 13:36       ` Vladimir Sementsov-Ogievskiy
2022-07-12 21:19 ` [RFC PATCH 3/8] RFC: block: use transactions as a replacement of ->{can_}set_aio_context() Emanuele Giuseppe Esposito
2022-07-14 16:45   ` Hanna Reitz
2022-07-18  8:45     ` Emanuele Giuseppe Esposito
2022-07-18  9:09     ` Emanuele Giuseppe Esposito
2022-07-20 14:09   ` Vladimir Sementsov-Ogievskiy
2022-07-25  8:35     ` Emanuele Giuseppe Esposito
2022-07-12 21:19 ` [RFC PATCH 4/8] blockjob: implement .change_aio_ctx in child_job Emanuele Giuseppe Esposito
2022-07-15 11:14   ` Hanna Reitz
2022-07-12 21:19 ` [RFC PATCH 5/8] block: implement .change_aio_ctx in child_of_bds Emanuele Giuseppe Esposito
2022-07-15 11:17   ` Hanna Reitz
2022-07-12 21:19 ` [RFC PATCH 6/8] block-backend: implement .change_aio_ctx in child_root Emanuele Giuseppe Esposito
2022-07-15 11:34   ` Hanna Reitz
2022-07-12 21:19 ` [RFC PATCH 7/8] block: use the new _change_ API instead of _can_set_ and _set_ Emanuele Giuseppe Esposito
2022-07-15 13:32   ` Hanna Reitz
2022-07-18 16:30   ` Paolo Bonzini
2022-07-18 16:39   ` Paolo Bonzini
2022-07-19  9:57     ` Emanuele Giuseppe Esposito
2022-07-19 18:07       ` Paolo Bonzini
2022-07-20 11:47         ` Emanuele Giuseppe Esposito
2022-07-12 21:19 ` [RFC PATCH 8/8] block: remove all unused ->can_set_aio_ctx and ->set_aio_ctx callbacks Emanuele Giuseppe Esposito
2022-07-15 14:34   ` Hanna Reitz
2022-07-18  8:45     ` Emanuele Giuseppe Esposito
2022-07-18 14:39       ` Emanuele Giuseppe Esposito

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.