block: Remove now redundant bdrv_wait_serialising_requests() calls

All callers of bdrv_wait_serialising_requests() (as opposed to
bdrv_wait_serialising_requests_locked()) are just duplicating the check
that tracked_request_begin() already performs now. After removing them,
bdrv_wait_serialising_requests() has no callers left and can go as well.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20261002132135.93345-3-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit cf4f672c11)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
Kevin Wolf authored and Michael Tokarev committed 2026-10-17 19:10:43 +03:00
1 parent e3477f56b4
commit 2e24f41f22
1 file changed
-19
-19
View File
@@ -806,20 +806,6 @@ void bdrv_dec_in_flight(BlockDriverState *bs)
bdrv_wakeup(bs);
}
static void coroutine_fn
bdrv_wait_serialising_requests(BdrvTrackedRequest *self)
{
BlockDriverState *bs = self->bs;
if (!qatomic_read(&bs->serialising_in_flight)) {
return;
}
qemu_mutex_lock(&bs->reqs_lock);
bdrv_wait_serialising_requests_locked(self);
qemu_mutex_unlock(&bs->reqs_lock);
}
void coroutine_fn bdrv_make_request_serialising(BdrvTrackedRequest *req,
uint64_t align)
{
@@ -1387,8 +1373,6 @@ bdrv_aligned_preadv(BdrvChild *child, BdrvTrackedRequest *req,
* it ensures that the CoR read and write operations are atomic and
* guest writes cannot interleave between them. */
bdrv_make_request_serialising(req, bdrv_get_cluster_size(bs));
} else {
bdrv_wait_serialising_requests(req);
}
if (flags & BDRV_REQ_COPY_ON_READ) {
@@ -2025,8 +2009,6 @@ bdrv_co_write_req_prepare(BdrvChild *child, int64_t offset, int64_t bytes,
}
bdrv_wait_serialising_requests_locked(req);
} else {
bdrv_wait_serialising_requests(req);
}
assert(req->overlap_offset <= offset);
@@ -3476,7 +3458,6 @@ static int coroutine_fn GRAPH_RDLOCK bdrv_co_copy_range_internal(
/* BDRV_REQ_SERIALISING is only for write operation */
assert(!(read_flags & BDRV_REQ_SERIALISING));
bdrv_wait_serialising_requests(&req);
ret = src->bs->drv->bdrv_co_copy_range_from(src->bs,
src, src_offset,