Commit 7e9bbc9f53a613cd59bc9ce1421b6932a64df66a
1 parent
58f8aead
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: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7178 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
2 additions
and
2 deletions
qemu-io.c
| @@ -172,7 +172,7 @@ static int do_aio_writev(QEMUIOVector *qiov, int64_t offset, int *total) | @@ -172,7 +172,7 @@ static int do_aio_writev(QEMUIOVector *qiov, int64_t offset, int *total) | ||
| 172 | while (async_ret == NOT_DONE) | 172 | while (async_ret == NOT_DONE) |
| 173 | qemu_aio_wait(); | 173 | qemu_aio_wait(); |
| 174 | 174 | ||
| 175 | - *total = qiov->size >> 9; | 175 | + *total = qiov->size; |
| 176 | return async_ret < 0 ? async_ret : 1; | 176 | return async_ret < 0 ? async_ret : 1; |
| 177 | } | 177 | } |
| 178 | 178 | ||
| @@ -634,7 +634,7 @@ writev_f(int argc, char **argv) | @@ -634,7 +634,7 @@ writev_f(int argc, char **argv) | ||
| 634 | 634 | ||
| 635 | nr_iov = argc - optind; | 635 | nr_iov = argc - optind; |
| 636 | qemu_iovec_init(&qiov, nr_iov); | 636 | qemu_iovec_init(&qiov, nr_iov); |
| 637 | - buf = p = qemu_io_alloc(count, 0xab); | 637 | + buf = p = qemu_io_alloc(count, pattern); |
| 638 | for (i = 0; i < nr_iov; i++) { | 638 | for (i = 0; i < nr_iov; i++) { |
| 639 | size_t len; | 639 | size_t len; |
| 640 | 640 |