[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH 5/5] qemu_aio_get used to clear all allocated bu
From: |
Frediano Ziglio |
Subject: |
[Qemu-devel] [RFC PATCH 5/5] qemu_aio_get used to clear all allocated buffer |
Date: |
Wed, 20 Jul 2011 09:57:04 +0200 |
Signed-off-by: Frediano Ziglio <address@hidden>
---
block/qcow.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/block/qcow.c b/block/qcow.c
index 007fb57..8fd1ee5 100644
--- a/block/qcow.c
+++ b/block/qcow.c
@@ -499,7 +499,6 @@ static QCowAIOCB *qcow_aio_setup(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
int is_write, QCowAIOCB *acb)
{
- memset(acb, 0, sizeof(*acb));
acb->bs = bs;
acb->sector_num = sector_num;
acb->qiov = qiov;
@@ -509,6 +508,7 @@ static QCowAIOCB *qcow_aio_setup(BlockDriverState *bs,
if (is_write)
qemu_iovec_to_buffer(qiov, acb->buf);
} else {
+ acb->orig_buf = NULL;
acb->buf = (uint8_t *)qiov->iov->iov_base;
}
acb->nb_sectors = nb_sectors;
--
1.7.1
- [Qemu-devel] [RFC PATCH 0/5] Coroutines cleanup, Frediano Ziglio, 2011/07/20
- [Qemu-devel] [RFC PATCH 1/5] allocate AIO on stack, Frediano Ziglio, 2011/07/20
- [Qemu-devel] [RFC PATCH 2/5] use more stack, Frediano Ziglio, 2011/07/20
- [Qemu-devel] [RFC PATCH 3/5] more stack work, Frediano Ziglio, 2011/07/20
- [Qemu-devel] [RFC PATCH 4/5] avoid dandling pointers, Frediano Ziglio, 2011/07/20
- [Qemu-devel] [RFC PATCH 5/5] qemu_aio_get used to clear all allocated buffer,
Frediano Ziglio <=
- Re: [Qemu-devel] [RFC PATCH 0/5] Coroutines cleanup, Kevin Wolf, 2011/07/20