block: Rename qemu_aio_release -> qemu_aio_unref
Suggested-by: BenoƮt Canet <benoit.canet@irqsave.net>
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
diff --git a/block/archipelago.c b/block/archipelago.c
index 435efa7..3c86d0b 100644
--- a/block/archipelago.c
+++ b/block/archipelago.c
@@ -317,7 +317,7 @@
aio_cb->common.cb(aio_cb->common.opaque, aio_cb->ret);
aio_cb->status = 0;
- qemu_aio_release(aio_cb);
+ qemu_aio_unref(aio_cb);
g_free(reqdata);
}
@@ -890,7 +890,7 @@
err_exit:
error_report("qemu_archipelago_aio_rw(): I/O Error\n");
- qemu_aio_release(aio_cb);
+ qemu_aio_unref(aio_cb);
return NULL;
}
diff --git a/block/blkdebug.c b/block/blkdebug.c
index 08131b3..ced0b60 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -444,7 +444,7 @@
struct BlkdebugAIOCB *acb = opaque;
qemu_bh_delete(acb->bh);
acb->common.cb(acb->common.opaque, acb->ret);
- qemu_aio_release(acb);
+ qemu_aio_unref(acb);
}
static BlockDriverAIOCB *inject_error(BlockDriverState *bs,
diff --git a/block/blkverify.c b/block/blkverify.c
index 460393f..7d64a23 100644
--- a/block/blkverify.c
+++ b/block/blkverify.c
@@ -192,7 +192,7 @@
qemu_vfree(acb->buf);
}
acb->common.cb(acb->common.opaque, acb->ret);
- qemu_aio_release(acb);
+ qemu_aio_unref(acb);
}
static void blkverify_aio_cb(void *opaque, int ret)
diff --git a/block/curl.c b/block/curl.c
index 6f5d6ae..225407c 100644
--- a/block/curl.c
+++ b/block/curl.c
@@ -212,7 +212,7 @@
qemu_iovec_from_buf(acb->qiov, 0, s->orig_buf + acb->start,
acb->end - acb->start);
acb->common.cb(acb->common.opaque, 0);
- qemu_aio_release(acb);
+ qemu_aio_unref(acb);
s->acb[i] = NULL;
}
}
@@ -304,7 +304,7 @@
}
acb->common.cb(acb->common.opaque, -EIO);
- qemu_aio_release(acb);
+ qemu_aio_unref(acb);
state->acb[i] = NULL;
}
}
@@ -636,7 +636,7 @@
// we can just call the callback and be done.
switch (curl_find_buf(s, start, acb->nb_sectors * SECTOR_SIZE, acb)) {
case FIND_RET_OK:
- qemu_aio_release(acb);
+ qemu_aio_unref(acb);
// fall through
case FIND_RET_WAIT:
return;
@@ -648,7 +648,7 @@
state = curl_init_state(acb->common.bs, s);
if (!state) {
acb->common.cb(acb->common.opaque, -EIO);
- qemu_aio_release(acb);
+ qemu_aio_unref(acb);
return;
}
@@ -664,7 +664,7 @@
if (state->buf_len && state->orig_buf == NULL) {
curl_clean_state(state);
acb->common.cb(acb->common.opaque, -ENOMEM);
- qemu_aio_release(acb);
+ qemu_aio_unref(acb);
return;
}
state->acb[0] = acb;
diff --git a/block/iscsi.c b/block/iscsi.c
index f8328d6..3c1b416 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -126,7 +126,7 @@
acb->task = NULL;
}
- qemu_aio_release(acb);
+ qemu_aio_unref(acb);
}
static void
@@ -680,7 +680,7 @@
if (acb->task == NULL) {
error_report("iSCSI: Failed to allocate task for scsi command. %s",
iscsi_get_error(iscsi));
- qemu_aio_release(acb);
+ qemu_aio_unref(acb);
return NULL;
}
memset(acb->task, 0, sizeof(struct scsi_task));
@@ -718,7 +718,7 @@
(data.size > 0) ? &data : NULL,
acb) != 0) {
scsi_free_scsi_task(acb->task);
- qemu_aio_release(acb);
+ qemu_aio_unref(acb);
return NULL;
}
diff --git a/block/linux-aio.c b/block/linux-aio.c
index b67f56c..f4baba2 100644
--- a/block/linux-aio.c
+++ b/block/linux-aio.c
@@ -88,7 +88,7 @@
}
laiocb->common.cb(laiocb->common.opaque, ret);
- qemu_aio_release(laiocb);
+ qemu_aio_unref(laiocb);
}
/* The completion BH fetches completed I/O requests and invokes their
@@ -286,7 +286,7 @@
return &laiocb->common;
out_free_aiocb:
- qemu_aio_release(laiocb);
+ qemu_aio_unref(laiocb);
return NULL;
}
diff --git a/block/qed.c b/block/qed.c
index 7a15d44..e2316d7 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -907,7 +907,7 @@
int ret = acb->bh_ret;
qemu_bh_delete(acb->bh);
- qemu_aio_release(acb);
+ qemu_aio_unref(acb);
/* Invoke callback */
cb(user_opaque, ret);
diff --git a/block/quorum.c b/block/quorum.c
index f343c04..7687466 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -168,7 +168,7 @@
}
g_free(acb->qcrs);
- qemu_aio_release(acb);
+ qemu_aio_unref(acb);
}
static bool quorum_sha256_compare(QuorumVoteValue *a, QuorumVoteValue *b)
diff --git a/block/rbd.c b/block/rbd.c
index e5341fc..96947e3 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -407,7 +407,7 @@
acb->common.cb(acb->common.opaque, (acb->ret > 0 ? 0 : acb->ret));
acb->status = 0;
- qemu_aio_release(acb);
+ qemu_aio_unref(acb);
}
/* TODO Convert to fine grained options */
@@ -671,7 +671,7 @@
failed:
g_free(rcb);
qemu_vfree(acb->bounce);
- qemu_aio_release(acb);
+ qemu_aio_unref(acb);
return NULL;
}
diff --git a/block/sheepdog.c b/block/sheepdog.c
index f538606..2d78ef9 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -445,7 +445,7 @@
static void coroutine_fn sd_finish_aiocb(SheepdogAIOCB *acb)
{
qemu_coroutine_enter(acb->coroutine, NULL);
- qemu_aio_release(acb);
+ qemu_aio_unref(acb);
}
/*
@@ -2130,7 +2130,7 @@
ret = sd_co_rw_vector(acb);
if (ret <= 0) {
- qemu_aio_release(acb);
+ qemu_aio_unref(acb);
return ret;
}
@@ -2151,7 +2151,7 @@
ret = sd_co_rw_vector(acb);
if (ret <= 0) {
- qemu_aio_release(acb);
+ qemu_aio_unref(acb);
return ret;
}
@@ -2510,7 +2510,7 @@
ret = sd_co_rw_vector(acb);
if (ret <= 0) {
- qemu_aio_release(acb);
+ qemu_aio_unref(acb);
return ret;
}
diff --git a/block/win32-aio.c b/block/win32-aio.c
index eed86f7..9323c1a 100644
--- a/block/win32-aio.c
+++ b/block/win32-aio.c
@@ -88,7 +88,7 @@
waiocb->common.cb(waiocb->common.opaque, ret);
- qemu_aio_release(waiocb);
+ qemu_aio_unref(waiocb);
}
static void win32_aio_completion_cb(EventNotifier *e)
@@ -158,7 +158,7 @@
out_dec_count:
aio->count--;
out:
- qemu_aio_release(waiocb);
+ qemu_aio_unref(waiocb);
return NULL;
}