mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
qed: Remove callback from qed_write_table()
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
29470d11bf
commit
453e53e2a1
3 changed files with 22 additions and 45 deletions
12
block/qed.c
12
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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue