qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] a couple of qemu-io fixes
Date: Thu, 9 Apr 2009 22:29:18 +0200	[thread overview]
Message-ID: <20090409202918.GA1986@lst.de> (raw)

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>

Index: qemu/qemu-io.c
===================================================================
--- qemu.orig/qemu-io.c	2009-04-09 22:11:37.898444895 +0200
+++ qemu/qemu-io.c	2009-04-09 22:20:20.207637751 +0200
@@ -172,7 +172,7 @@ static int do_aio_writev(QEMUIOVector *q
 	while (async_ret == NOT_DONE)
 		qemu_aio_wait();
 
-	*total = qiov->size >> 9;
+	*total = qiov->size;
 	return async_ret < 0 ? async_ret : 1;
 }
 
@@ -668,7 +668,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;
 

             reply	other threads:[~2009-04-09 20:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-09 20:29 Christoph Hellwig [this message]
2009-04-18 15:40 ` [Qemu-devel] [PATCH] a couple of qemu-io fixes Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090409202918.GA1986@lst.de \
    --to=hch@lst.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).