diff options
author | Kevin Wolf <kwolf@redhat.com> | 2016-11-15 11:14:01 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2017-06-26 14:51:14 +0200 |
commit | 453e53e2a1128b85a03af7fd597292c9b6f8a9a0 (patch) | |
tree | ee04ac8e2a25d3237e68efcbdcf8de86365a90f6 /block/qed.c | |
parent | 29470d11bf310de58e05ceadd61f25e6ed9ea8de (diff) |
qed: Remove callback from qed_write_table()
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/qed.c')
-rw-r--r-- | block/qed.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/block/qed.c b/block/qed.c index 95f1050f8b..8c493bb393 100644 --- a/block/qed.c +++ b/block/qed.c @@ -1000,7 +1000,8 @@ static void qed_aio_write_l1_update(void *opaque, int ret) index = qed_l1_index(s, acb->cur_pos); s->l1_table->offsets[index] = acb->request.l2_table->offset; - qed_write_l1_table(s, index, 1, qed_commit_l2_update, acb); + ret = qed_write_l1_table(s, index, 1); + qed_commit_l2_update(acb, ret); } /** @@ -1027,12 +1028,13 @@ static void qed_aio_write_l2_update(QEDAIOCB *acb, int ret, uint64_t offset) if (need_alloc) { /* Write out the whole new L2 table */ - qed_write_l2_table(s, &acb->request, 0, s->table_nelems, true, - qed_aio_write_l1_update, acb); + ret = qed_write_l2_table(s, &acb->request, 0, s->table_nelems, true); + qed_aio_write_l1_update(acb, ret); } else { /* Write out only the updated part of the L2 table */ - qed_write_l2_table(s, &acb->request, index, acb->cur_nclusters, false, - qed_aio_next_io_cb, acb); + ret = qed_write_l2_table(s, &acb->request, index, acb->cur_nclusters, + false); + qed_aio_next_io(acb, ret); } return; |