mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
Pull request
- Stefano Garzarella's blkio block driver 'fd' parameter - My thread-local blk_io_plug() series -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmR4uHoACgkQnKSrs4Gr c8hFBAgAo+SFrOteYgdELM9s0EWb0AU39MTOyNXW7i5mPZNXrn5J7pfRD/5wvI6l wl5GNMQ+M5HVYO7CumKWr4M1IpKV5Jin6FN/2h15fWkeg17lBOmNHUF+LctLYQbq HwtNA4hdw1+SEv8kQLBgiqSJMqWcn80X09emgPMCIwET9zxokRYwVjQJx2alM5bd SqgitDp5qlHyj5HQPX2orT9KrXYWQdGr8i50bn0S67r1wdqTRMu93wrWdEUUncId 7otlUaq8cARbRMJzIwDmy/cF24Ynr0wCJb4aHW+trRtf+PNgx1Ki+YOiz+LFyjq7 t6KOMeignzhz9Uzq8EVG4XW8SHpGkw== =Ms48 -----END PGP SIGNATURE----- Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging Pull request - Stefano Garzarella's blkio block driver 'fd' parameter - My thread-local blk_io_plug() series # -----BEGIN PGP SIGNATURE----- # # iQEzBAABCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmR4uHoACgkQnKSrs4Gr # c8hFBAgAo+SFrOteYgdELM9s0EWb0AU39MTOyNXW7i5mPZNXrn5J7pfRD/5wvI6l # wl5GNMQ+M5HVYO7CumKWr4M1IpKV5Jin6FN/2h15fWkeg17lBOmNHUF+LctLYQbq # HwtNA4hdw1+SEv8kQLBgiqSJMqWcn80X09emgPMCIwET9zxokRYwVjQJx2alM5bd # SqgitDp5qlHyj5HQPX2orT9KrXYWQdGr8i50bn0S67r1wdqTRMu93wrWdEUUncId # 7otlUaq8cARbRMJzIwDmy/cF24Ynr0wCJb4aHW+trRtf+PNgx1Ki+YOiz+LFyjq7 # t6KOMeignzhz9Uzq8EVG4XW8SHpGkw== # =Ms48 # -----END PGP SIGNATURE----- # gpg: Signature made Thu 01 Jun 2023 08:25:46 AM PDT # gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full] # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full] * tag 'block-pull-request' of https://gitlab.com/stefanha/qemu: qapi: add '@fdset' feature for BlockdevOptionsVirtioBlkVhostVdpa block/blkio: use qemu_open() to support fd passing for virtio-blk block: remove bdrv_co_io_plug() API block/linux-aio: convert to blk_io_plug_call() API block/io_uring: convert to blk_io_plug_call() API block/blkio: convert to blk_io_plug_call() API block/nvme: convert to blk_io_plug_call() API block: add blk_io_plug_call() API Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
commit
9eb400cdd7
20 changed files with 293 additions and 265 deletions
|
@ -259,9 +259,6 @@ void coroutine_fn bdrv_co_leave(BlockDriverState *bs, AioContext *old_ctx);
|
|||
|
||||
AioContext *child_of_bds_get_parent_aio_context(BdrvChild *c);
|
||||
|
||||
void coroutine_fn GRAPH_RDLOCK bdrv_co_io_plug(BlockDriverState *bs);
|
||||
void coroutine_fn GRAPH_RDLOCK bdrv_co_io_unplug(BlockDriverState *bs);
|
||||
|
||||
bool coroutine_fn GRAPH_RDLOCK
|
||||
bdrv_co_can_store_new_dirty_bitmap(BlockDriverState *bs, const char *name,
|
||||
uint32_t granularity, Error **errp);
|
||||
|
|
|
@ -768,11 +768,6 @@ struct BlockDriver {
|
|||
void coroutine_fn GRAPH_RDLOCK_PTR (*bdrv_co_debug_event)(
|
||||
BlockDriverState *bs, BlkdebugEvent event);
|
||||
|
||||
/* io queue for linux-aio */
|
||||
void coroutine_fn GRAPH_RDLOCK_PTR (*bdrv_co_io_plug)(BlockDriverState *bs);
|
||||
void coroutine_fn GRAPH_RDLOCK_PTR (*bdrv_co_io_unplug)(
|
||||
BlockDriverState *bs);
|
||||
|
||||
bool (*bdrv_supports_persistent_dirty_bitmap)(BlockDriverState *bs);
|
||||
|
||||
bool coroutine_fn GRAPH_RDLOCK_PTR (*bdrv_co_can_store_new_dirty_bitmap)(
|
||||
|
@ -1227,12 +1222,6 @@ struct BlockDriverState {
|
|||
unsigned int in_flight;
|
||||
unsigned int serialising_in_flight;
|
||||
|
||||
/*
|
||||
* counter for nested bdrv_io_plug.
|
||||
* Accessed with atomic ops.
|
||||
*/
|
||||
unsigned io_plugged;
|
||||
|
||||
/* do we need to tell the quest if we have a volatile write cache? */
|
||||
int enable_write_cache;
|
||||
|
||||
|
|
|
@ -62,13 +62,6 @@ int coroutine_fn laio_co_submit(int fd, uint64_t offset, QEMUIOVector *qiov,
|
|||
|
||||
void laio_detach_aio_context(LinuxAioState *s, AioContext *old_context);
|
||||
void laio_attach_aio_context(LinuxAioState *s, AioContext *new_context);
|
||||
|
||||
/*
|
||||
* laio_io_plug/unplug work in the thread's current AioContext, therefore the
|
||||
* caller must ensure that they are paired in the same IOThread.
|
||||
*/
|
||||
void laio_io_plug(void);
|
||||
void laio_io_unplug(uint64_t dev_max_batch);
|
||||
#endif
|
||||
/* io_uring.c - Linux io_uring implementation */
|
||||
#ifdef CONFIG_LINUX_IO_URING
|
||||
|
@ -81,13 +74,6 @@ int coroutine_fn luring_co_submit(BlockDriverState *bs, int fd, uint64_t offset,
|
|||
QEMUIOVector *qiov, int type);
|
||||
void luring_detach_aio_context(LuringState *s, AioContext *old_context);
|
||||
void luring_attach_aio_context(LuringState *s, AioContext *new_context);
|
||||
|
||||
/*
|
||||
* luring_io_plug/unplug work in the thread's current AioContext, therefore the
|
||||
* caller must ensure that they are paired in the same IOThread.
|
||||
*/
|
||||
void luring_io_plug(void);
|
||||
void luring_io_unplug(void);
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -100,16 +100,9 @@ void blk_iostatus_set_err(BlockBackend *blk, int error);
|
|||
int blk_get_max_iov(BlockBackend *blk);
|
||||
int blk_get_max_hw_iov(BlockBackend *blk);
|
||||
|
||||
/*
|
||||
* blk_io_plug/unplug are thread-local operations. This means that multiple
|
||||
* IOThreads can simultaneously call plug/unplug, but the caller must ensure
|
||||
* that each unplug() is called in the same IOThread of the matching plug().
|
||||
*/
|
||||
void coroutine_fn blk_co_io_plug(BlockBackend *blk);
|
||||
void co_wrapper blk_io_plug(BlockBackend *blk);
|
||||
|
||||
void coroutine_fn blk_co_io_unplug(BlockBackend *blk);
|
||||
void co_wrapper blk_io_unplug(BlockBackend *blk);
|
||||
void blk_io_plug(void);
|
||||
void blk_io_unplug(void);
|
||||
void blk_io_plug_call(void (*fn)(void *), void *opaque);
|
||||
|
||||
AioContext *blk_get_aio_context(BlockBackend *blk);
|
||||
BlockAcctStats *blk_get_stats(BlockBackend *blk);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue