mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-15 04:09:44 +00:00
Remove tabs from qcow_aio_read_cb(). (Gleb Natapov)
Fix indentation. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5857 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
4a55bfdfcf
commit
ac67488746
@ -1186,7 +1186,7 @@ static void qcow_aio_read_cb(void *opaque, int ret)
|
|||||||
|
|
||||||
acb->hd_aiocb = NULL;
|
acb->hd_aiocb = NULL;
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
fail:
|
fail:
|
||||||
acb->common.cb(acb->common.opaque, ret);
|
acb->common.cb(acb->common.opaque, ret);
|
||||||
qemu_aio_release(acb);
|
qemu_aio_release(acb);
|
||||||
return;
|
return;
|
||||||
@ -1232,30 +1232,30 @@ static void qcow_aio_read_cb(void *opaque, int ret)
|
|||||||
if (acb->hd_aiocb == NULL)
|
if (acb->hd_aiocb == NULL)
|
||||||
goto fail;
|
goto fail;
|
||||||
} else {
|
} else {
|
||||||
if (acb->bh) {
|
if (acb->bh) {
|
||||||
ret = -EIO;
|
ret = -EIO;
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
acb->bh = qemu_bh_new(qcow_aio_read_bh, acb);
|
acb->bh = qemu_bh_new(qcow_aio_read_bh, acb);
|
||||||
if (!acb->bh) {
|
if (!acb->bh) {
|
||||||
ret = -EIO;
|
ret = -EIO;
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
qemu_bh_schedule(acb->bh);
|
qemu_bh_schedule(acb->bh);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Note: in this case, no need to wait */
|
/* Note: in this case, no need to wait */
|
||||||
memset(acb->buf, 0, 512 * acb->n);
|
memset(acb->buf, 0, 512 * acb->n);
|
||||||
if (acb->bh) {
|
if (acb->bh) {
|
||||||
ret = -EIO;
|
ret = -EIO;
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
acb->bh = qemu_bh_new(qcow_aio_read_bh, acb);
|
acb->bh = qemu_bh_new(qcow_aio_read_bh, acb);
|
||||||
if (!acb->bh) {
|
if (!acb->bh) {
|
||||||
ret = -EIO;
|
ret = -EIO;
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
qemu_bh_schedule(acb->bh);
|
qemu_bh_schedule(acb->bh);
|
||||||
}
|
}
|
||||||
} else if (acb->cluster_offset & QCOW_OFLAG_COMPRESSED) {
|
} else if (acb->cluster_offset & QCOW_OFLAG_COMPRESSED) {
|
||||||
/* add AIO support for compressed blocks ? */
|
/* add AIO support for compressed blocks ? */
|
||||||
@ -1263,16 +1263,16 @@ static void qcow_aio_read_cb(void *opaque, int ret)
|
|||||||
goto fail;
|
goto fail;
|
||||||
memcpy(acb->buf,
|
memcpy(acb->buf,
|
||||||
s->cluster_cache + index_in_cluster * 512, 512 * acb->n);
|
s->cluster_cache + index_in_cluster * 512, 512 * acb->n);
|
||||||
if (acb->bh) {
|
if (acb->bh) {
|
||||||
ret = -EIO;
|
ret = -EIO;
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
acb->bh = qemu_bh_new(qcow_aio_read_bh, acb);
|
acb->bh = qemu_bh_new(qcow_aio_read_bh, acb);
|
||||||
if (!acb->bh) {
|
if (!acb->bh) {
|
||||||
ret = -EIO;
|
ret = -EIO;
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
qemu_bh_schedule(acb->bh);
|
qemu_bh_schedule(acb->bh);
|
||||||
} else {
|
} else {
|
||||||
if ((acb->cluster_offset & 511) != 0) {
|
if ((acb->cluster_offset & 511) != 0) {
|
||||||
ret = -EIO;
|
ret = -EIO;
|
||||||
@ -1551,7 +1551,7 @@ static int qcow_make_empty(BlockDriverState *bs)
|
|||||||
|
|
||||||
memset(s->l1_table, 0, l1_length);
|
memset(s->l1_table, 0, l1_length);
|
||||||
if (bdrv_pwrite(s->hd, s->l1_table_offset, s->l1_table, l1_length) < 0)
|
if (bdrv_pwrite(s->hd, s->l1_table_offset, s->l1_table, l1_length) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
ret = bdrv_truncate(s->hd, s->l1_table_offset + l1_length);
|
ret = bdrv_truncate(s->hd, s->l1_table_offset + l1_length);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user