提交 7e9bbc9f 编写于 作者: A aliguori

a couple of qemu-io fixes (Christoph Hellwig)

Fix two stupid bugs that I forgot to push out:


 - qiov->size already is in bytes, no need to shift it
 - actually use the supplied patter in the writev command
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7178 c046a42c-6fe2-441c-8c8c-71466251a162
上级 58f8aead
......@@ -172,7 +172,7 @@ static int do_aio_writev(QEMUIOVector *qiov, int64_t offset, int *total)
while (async_ret == NOT_DONE)
qemu_aio_wait();
*total = qiov->size >> 9;
*total = qiov->size;
return async_ret < 0 ? async_ret : 1;
}
......@@ -634,7 +634,7 @@ writev_f(int argc, char **argv)
nr_iov = argc - optind;
qemu_iovec_init(&qiov, nr_iov);
buf = p = qemu_io_alloc(count, 0xab);
buf = p = qemu_io_alloc(count, pattern);
for (i = 0; i < nr_iov; i++) {
size_t len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册