[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 21/25] qemu-pr-helper: mark more coroutine_fns
From: |
Kevin Wolf |
Subject: |
[PULL 21/25] qemu-pr-helper: mark more coroutine_fns |
Date: |
Tue, 25 Apr 2023 15:13:55 +0200 |
From: Paolo Bonzini <pbonzini@redhat.com>
do_sgio can suspend via the coroutine function thread_pool_submit_co, so it
has to be coroutine_fn as well---and the same is true of all its direct and
indirect callers.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20230309084456.304669-7-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
scsi/qemu-pr-helper.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/scsi/qemu-pr-helper.c b/scsi/qemu-pr-helper.c
index e9b3ad259a..a857e80c03 100644
--- a/scsi/qemu-pr-helper.c
+++ b/scsi/qemu-pr-helper.c
@@ -177,8 +177,8 @@ static int do_sgio_worker(void *opaque)
return status;
}
-static int do_sgio(int fd, const uint8_t *cdb, uint8_t *sense,
- uint8_t *buf, int *sz, int dir)
+static int coroutine_fn do_sgio(int fd, const uint8_t *cdb, uint8_t *sense,
+ uint8_t *buf, int *sz, int dir)
{
int r;
@@ -319,7 +319,7 @@ static SCSISense mpath_generic_sense(int r)
}
}
-static int mpath_reconstruct_sense(int fd, int r, uint8_t *sense)
+static int coroutine_fn mpath_reconstruct_sense(int fd, int r, uint8_t *sense)
{
switch (r) {
case MPATH_PR_SUCCESS:
@@ -371,8 +371,8 @@ static int mpath_reconstruct_sense(int fd, int r, uint8_t
*sense)
}
}
-static int multipath_pr_in(int fd, const uint8_t *cdb, uint8_t *sense,
- uint8_t *data, int sz)
+static int coroutine_fn multipath_pr_in(int fd, const uint8_t *cdb, uint8_t
*sense,
+ uint8_t *data, int sz)
{
int rq_servact = cdb[1];
struct prin_resp resp;
@@ -426,8 +426,8 @@ static int multipath_pr_in(int fd, const uint8_t *cdb,
uint8_t *sense,
return mpath_reconstruct_sense(fd, r, sense);
}
-static int multipath_pr_out(int fd, const uint8_t *cdb, uint8_t *sense,
- const uint8_t *param, int sz)
+static int coroutine_fn multipath_pr_out(int fd, const uint8_t *cdb, uint8_t
*sense,
+ const uint8_t *param, int sz)
{
int rq_servact = cdb[1];
int rq_scope = cdb[2] >> 4;
@@ -544,8 +544,8 @@ static int multipath_pr_out(int fd, const uint8_t *cdb,
uint8_t *sense,
}
#endif
-static int do_pr_in(int fd, const uint8_t *cdb, uint8_t *sense,
- uint8_t *data, int *resp_sz)
+static int coroutine_fn do_pr_in(int fd, const uint8_t *cdb, uint8_t *sense,
+ uint8_t *data, int *resp_sz)
{
#ifdef CONFIG_MPATH
if (is_mpath(fd)) {
@@ -562,8 +562,8 @@ static int do_pr_in(int fd, const uint8_t *cdb, uint8_t
*sense,
SG_DXFER_FROM_DEV);
}
-static int do_pr_out(int fd, const uint8_t *cdb, uint8_t *sense,
- const uint8_t *param, int sz)
+static int coroutine_fn do_pr_out(int fd, const uint8_t *cdb, uint8_t *sense,
+ const uint8_t *param, int sz)
{
int resp_sz;
--
2.40.0
- [PULL 20/25] 9pfs: mark more coroutine_fns, (continued)
- [PULL 20/25] 9pfs: mark more coroutine_fns, Kevin Wolf, 2023/04/25
- [PULL 18/25] mirror: make mirror_flush a coroutine_fn, do not use co_wrappers, Kevin Wolf, 2023/04/25
- [PULL 15/25] thread-pool: avoid passing the pool parameter every time, Kevin Wolf, 2023/04/25
- [PULL 19/25] nbd: mark more coroutine_fns, do not use co_wrappers, Kevin Wolf, 2023/04/25
- [PULL 22/25] tests: mark more coroutine_fns, Kevin Wolf, 2023/04/25
- [PULL 17/25] blkdebug: add missing coroutine_fn annotation, Kevin Wolf, 2023/04/25
- [PULL 24/25] vmdk: make vmdk_is_cid_valid a coroutine_fn, Kevin Wolf, 2023/04/25
- [PULL 25/25] block/monitor/block-hmp-cmds.c: Fix crash when execute hmp_commit, Kevin Wolf, 2023/04/25
- [PULL 23/25] qcow2: mark various functions as coroutine_fn and GRAPH_RDLOCK, Kevin Wolf, 2023/04/25
- [PULL 14/25] thread-pool: use ThreadPool from the running thread, Kevin Wolf, 2023/04/25
- [PULL 21/25] qemu-pr-helper: mark more coroutine_fns,
Kevin Wolf <=
- Re: [PULL 00/25] Block layer patches, Richard Henderson, 2023/04/26