aboutsummaryrefslogtreecommitdiff
path: root/block/io.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2022-08-17 10:37:36 +0200
committerKevin Wolf <kwolf@redhat.com>2022-09-30 18:43:44 +0200
commit131498f775ea18852992dc56441eba33de3fcde5 (patch)
tree7e7e593a14ce602c5df5dcc5da05d0c0b3d6c446 /block/io.c
parent006e1962449f8ea9f0822b838d9fdf13c98eb147 (diff)
downloadqemu-131498f775ea18852992dc56441eba33de3fcde5.zip
qemu-131498f775ea18852992dc56441eba33de3fcde5.tar.gz
qemu-131498f775ea18852992dc56441eba33de3fcde5.tar.bz2
block: make serializing requests functions 'void'
Return codes of the following functions are never used in the code: * bdrv_wait_serialising_requests_locked * bdrv_wait_serialising_requests * bdrv_make_request_serialising Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Kevin Wolf <kwolf@redhat.com> CC: Hanna Reitz <hreitz@redhat.com> CC: Stefan Hajnoczi <stefanha@redhat.com> CC: Fam Zheng <fam@euphon.net> CC: Ronnie Sahlberg <ronniesahlberg@gmail.com> CC: Paolo Bonzini <pbonzini@redhat.com> CC: Peter Lieven <pl@kamp.de> CC: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Message-Id: <20220817083736.40981-3-den@openvz.org> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/io.c')
-rw-r--r--block/io.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/block/io.c b/block/io.c
index 0a8cbef..51d8f94 100644
--- a/block/io.c
+++ b/block/io.c
@@ -828,20 +828,16 @@ bdrv_find_conflicting_request(BdrvTrackedRequest *self)
}
/* Called with self->bs->reqs_lock held */
-static bool coroutine_fn
+static void coroutine_fn
bdrv_wait_serialising_requests_locked(BdrvTrackedRequest *self)
{
BdrvTrackedRequest *req;
- bool waited = false;
while ((req = bdrv_find_conflicting_request(self))) {
self->waiting_for = req;
qemu_co_queue_wait(&req->wait_queue, &self->bs->reqs_lock);
self->waiting_for = NULL;
- waited = true;
}
-
- return waited;
}
/* Called with req->bs->reqs_lock held */
@@ -934,36 +930,31 @@ void bdrv_dec_in_flight(BlockDriverState *bs)
bdrv_wakeup(bs);
}
-static bool coroutine_fn bdrv_wait_serialising_requests(BdrvTrackedRequest *self)
+static void coroutine_fn
+bdrv_wait_serialising_requests(BdrvTrackedRequest *self)
{
BlockDriverState *bs = self->bs;
- bool waited = false;
if (!qatomic_read(&bs->serialising_in_flight)) {
- return false;
+ return;
}
qemu_co_mutex_lock(&bs->reqs_lock);
- waited = bdrv_wait_serialising_requests_locked(self);
+ bdrv_wait_serialising_requests_locked(self);
qemu_co_mutex_unlock(&bs->reqs_lock);
-
- return waited;
}
-bool coroutine_fn bdrv_make_request_serialising(BdrvTrackedRequest *req,
+void coroutine_fn bdrv_make_request_serialising(BdrvTrackedRequest *req,
uint64_t align)
{
- bool waited;
IO_CODE();
qemu_co_mutex_lock(&req->bs->reqs_lock);
tracked_request_set_serialising(req, align);
- waited = bdrv_wait_serialising_requests_locked(req);
+ bdrv_wait_serialising_requests_locked(req);
qemu_co_mutex_unlock(&req->bs->reqs_lock);
-
- return waited;
}
int bdrv_check_qiov_request(int64_t offset, int64_t bytes,