mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
Pull request
-----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmDm+YkACgkQnKSrs4Gr c8jkfQf+PuiSrU9t5MjU//jKPBpx/Jl9FqsKIlWC+6NOYQFhzD7A7rftuOSG1HOW Cil9rWO/57u/i7DcrABRlMkZ17zv6tP0876LRXRybVnjX4pQ4ayEtMio4WdjAna+ 1hL9P+c6tuo6wlGkM+R2yX4QIOSw+74Qbkh8sLrVwGYzA94erXbuJi/iix8t11iR joiNZ/k6yZPyMbzgT11A0On5qdaNNVfQeA59pyQEnucia02285VkCPLMaO+Trkgl 7VQ1V3cNAdWVaPU0kXDCx595K1BlfrGHNimxfq2UeUZd2AvqHCohlG/egrEHfOu2 Ek4dAqXn6p2eufGi/BzQi8V4J0nPRA== =SDmL -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/stefanha-gitlab/tags/block-pull-request' into staging Pull request # gpg: Signature made Thu 08 Jul 2021 14:11:37 BST # gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full] # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full] # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha-gitlab/tags/block-pull-request: block/io: Merge discard request alignments block: Add backend_defaults property block/file-posix: Optimize for macOS util/async: print leaked BH name when AioContext finalizes util/async: add a human-readable name to BHs for debugging Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
53c0123118
10 changed files with 163 additions and 19 deletions
|
@ -292,19 +292,44 @@ void aio_context_acquire(AioContext *ctx);
|
|||
void aio_context_release(AioContext *ctx);
|
||||
|
||||
/**
|
||||
* aio_bh_schedule_oneshot: Allocate a new bottom half structure that will run
|
||||
* only once and as soon as possible.
|
||||
* aio_bh_schedule_oneshot_full: Allocate a new bottom half structure that will
|
||||
* run only once and as soon as possible.
|
||||
*
|
||||
* @name: A human-readable identifier for debugging purposes.
|
||||
*/
|
||||
void aio_bh_schedule_oneshot(AioContext *ctx, QEMUBHFunc *cb, void *opaque);
|
||||
void aio_bh_schedule_oneshot_full(AioContext *ctx, QEMUBHFunc *cb, void *opaque,
|
||||
const char *name);
|
||||
|
||||
/**
|
||||
* aio_bh_new: Allocate a new bottom half structure.
|
||||
* aio_bh_schedule_oneshot: Allocate a new bottom half structure that will run
|
||||
* only once and as soon as possible.
|
||||
*
|
||||
* A convenience wrapper for aio_bh_schedule_oneshot_full() that uses cb as the
|
||||
* name string.
|
||||
*/
|
||||
#define aio_bh_schedule_oneshot(ctx, cb, opaque) \
|
||||
aio_bh_schedule_oneshot_full((ctx), (cb), (opaque), (stringify(cb)))
|
||||
|
||||
/**
|
||||
* aio_bh_new_full: Allocate a new bottom half structure.
|
||||
*
|
||||
* Bottom halves are lightweight callbacks whose invocation is guaranteed
|
||||
* to be wait-free, thread-safe and signal-safe. The #QEMUBH structure
|
||||
* is opaque and must be allocated prior to its use.
|
||||
*
|
||||
* @name: A human-readable identifier for debugging purposes.
|
||||
*/
|
||||
QEMUBH *aio_bh_new(AioContext *ctx, QEMUBHFunc *cb, void *opaque);
|
||||
QEMUBH *aio_bh_new_full(AioContext *ctx, QEMUBHFunc *cb, void *opaque,
|
||||
const char *name);
|
||||
|
||||
/**
|
||||
* aio_bh_new: Allocate a new bottom half structure
|
||||
*
|
||||
* A convenience wrapper for aio_bh_new_full() that uses the cb as the name
|
||||
* string.
|
||||
*/
|
||||
#define aio_bh_new(ctx, cb, opaque) \
|
||||
aio_bh_new_full((ctx), (cb), (opaque), (stringify(cb)))
|
||||
|
||||
/**
|
||||
* aio_notify: Force processing of pending events.
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
typedef struct BlockConf {
|
||||
BlockBackend *blk;
|
||||
OnOffAuto backend_defaults;
|
||||
uint32_t physical_block_size;
|
||||
uint32_t logical_block_size;
|
||||
uint32_t min_io_size;
|
||||
|
@ -48,6 +49,8 @@ static inline unsigned int get_physical_block_exp(BlockConf *conf)
|
|||
}
|
||||
|
||||
#define DEFINE_BLOCK_PROPERTIES_BASE(_state, _conf) \
|
||||
DEFINE_PROP_ON_OFF_AUTO("backend_defaults", _state, \
|
||||
_conf.backend_defaults, ON_OFF_AUTO_AUTO), \
|
||||
DEFINE_PROP_BLOCKSIZE("logical_block_size", _state, \
|
||||
_conf.logical_block_size), \
|
||||
DEFINE_PROP_BLOCKSIZE("physical_block_size", _state, \
|
||||
|
|
|
@ -294,7 +294,9 @@ void qemu_cond_timedwait_iothread(QemuCond *cond, int ms);
|
|||
|
||||
void qemu_fd_register(int fd);
|
||||
|
||||
QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque);
|
||||
#define qemu_bh_new(cb, opaque) \
|
||||
qemu_bh_new_full((cb), (opaque), (stringify(cb)))
|
||||
QEMUBH *qemu_bh_new_full(QEMUBHFunc *cb, void *opaque, const char *name);
|
||||
void qemu_bh_schedule_idle(QEMUBH *bh);
|
||||
|
||||
enum {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue