[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/28] block: add missing coroutine_fn annotations
From: |
Kevin Wolf |
Subject: |
[PULL 02/28] block: add missing coroutine_fn annotations |
Date: |
Wed, 10 May 2023 14:20:45 +0200 |
From: Paolo Bonzini <pbonzini@redhat.com>
After the recent introduction of many new coroutine callbacks,
a couple calls from non-coroutine_fn to coroutine_fn have sneaked
in; fix them.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20230406101752.242125-1-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
include/block/graph-lock.h | 4 ++--
block/mirror.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/block/graph-lock.h b/include/block/graph-lock.h
index 18cc14de22..ac0fef8605 100644
--- a/include/block/graph-lock.h
+++ b/include/block/graph-lock.h
@@ -208,14 +208,14 @@ typedef struct GraphLockable { } GraphLockable;
* unlocked. TSA_ASSERT() makes sure that the following calls know that we
* hold the lock while unlocking is left unchecked.
*/
-static inline GraphLockable * TSA_ASSERT(graph_lock) TSA_NO_TSA
+static inline GraphLockable * TSA_ASSERT(graph_lock) TSA_NO_TSA coroutine_fn
graph_lockable_auto_lock(GraphLockable *x)
{
bdrv_graph_co_rdlock();
return x;
}
-static inline void TSA_NO_TSA
+static inline void TSA_NO_TSA coroutine_fn
graph_lockable_auto_unlock(GraphLockable *x)
{
bdrv_graph_co_rdunlock();
diff --git a/block/mirror.c b/block/mirror.c
index af9bbd23d4..80fa345071 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -270,8 +270,8 @@ static inline int64_t mirror_clip_bytes(MirrorBlockJob *s,
/* Round offset and/or bytes to target cluster if COW is needed, and
* return the offset of the adjusted tail against original. */
-static int mirror_cow_align(MirrorBlockJob *s, int64_t *offset,
- uint64_t *bytes)
+static int coroutine_fn mirror_cow_align(MirrorBlockJob *s, int64_t *offset,
+ uint64_t *bytes)
{
bool need_cow;
int ret = 0;
--
2.40.1
- [PULL 00/28] Block layer patches, Kevin Wolf, 2023/05/10
- [PULL 01/28] block: add configure options for excluding vmdk, vhdx and vpc, Kevin Wolf, 2023/05/10
- [PULL 02/28] block: add missing coroutine_fn annotations,
Kevin Wolf <=
- [PULL 03/28] aio-wait: avoid AioContext lock in aio_wait_bh_oneshot(), Kevin Wolf, 2023/05/10
- [PULL 07/28] qcow2: Don't call bdrv_getlength() in coroutine_fns, Kevin Wolf, 2023/05/10
- [PULL 04/28] block: Fix use after free in blockdev_mark_auto_del(), Kevin Wolf, 2023/05/10
- [PULL 05/28] iotests/nbd-reconnect-on-open: Fix NBD socket path, Kevin Wolf, 2023/05/10
- [PULL 06/28] migration: Attempt disk reactivation in more failure scenarios, Kevin Wolf, 2023/05/10
- [PULL 08/28] block: Consistently call bdrv_activate() outside coroutine, Kevin Wolf, 2023/05/10
- [PULL 12/28] test-bdrv-drain: Don't modify the graph in coroutines, Kevin Wolf, 2023/05/10
- [PULL 15/28] block: .bdrv_open is non-coroutine and unlocked, Kevin Wolf, 2023/05/10
- [PULL 10/28] block: Don't call no_coroutine_fns in qmp_block_resize(), Kevin Wolf, 2023/05/10
- [PULL 11/28] iotests: Test resizing image attached to an iothread, Kevin Wolf, 2023/05/10