From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ls0sH-0007we-JR for qemu-devel@nongnu.org; Thu, 09 Apr 2009 16:29:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ls0sD-0007vD-3s for qemu-devel@nongnu.org; Thu, 09 Apr 2009 16:29:25 -0400 Received: from [199.232.76.173] (port=47413 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ls0sD-0007vA-0Z for qemu-devel@nongnu.org; Thu, 09 Apr 2009 16:29:21 -0400 Received: from verein.lst.de ([213.95.11.210]:34190) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1Ls0sC-0001kW-Iv for qemu-devel@nongnu.org; Thu, 09 Apr 2009 16:29:20 -0400 Received: from verein.lst.de (localhost [127.0.0.1]) by verein.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id n39KTIIF002059 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 9 Apr 2009 22:29:18 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id n39KTI2Z002057 for qemu-devel@nongnu.org; Thu, 9 Apr 2009 22:29:18 +0200 Date: Thu, 9 Apr 2009 22:29:18 +0200 From: Christoph Hellwig Message-ID: <20090409202918.GA1986@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] a couple of qemu-io fixes Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 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;