From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LirvG-0006XY-6S for qemu-devel@nongnu.org; Sun, 15 Mar 2009 11:06:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LirvB-0006Wy-Io for qemu-devel@nongnu.org; Sun, 15 Mar 2009 11:06:41 -0400 Received: from [199.232.76.173] (port=45176 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LirvB-0006Wv-GB for qemu-devel@nongnu.org; Sun, 15 Mar 2009 11:06:37 -0400 Received: from verein.lst.de ([213.95.11.210]:39806) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1LirvA-0004KE-S3 for qemu-devel@nongnu.org; Sun, 15 Mar 2009 11:06:37 -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 n2FF6ZIF032197 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sun, 15 Mar 2009 16:06:35 +0100 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id n2FF6Ysr032195 for qemu-devel@nongnu.org; Sun, 15 Mar 2009 16:06:34 +0100 Date: Sun, 15 Mar 2009 16:06:34 +0100 From: Christoph Hellwig Subject: Re: [Qemu-devel] [PATCH 1/3] Add specialized block driver scsi generic API Message-ID: <20090315150634.GA32019@lst.de> References: <1236862631-22918-1-git-send-email-avi@redhat.com> <1236862631-22918-2-git-send-email-avi@redhat.com> <20090314143327.GA26791@lst.de> <49BD0892.3060604@redhat.com> <20090315144313.GA30986@lst.de> <49BD1771.9040905@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49BD1771.9040905@redhat.com> 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 On Sun, Mar 15, 2009 at 04:57:53PM +0200, Avi Kivity wrote: > Christoph Hellwig wrote: > >The patch series (now posted) makes all aio APIs use iovecs. The > >current non-iovec based SG API would require some nasty shims allocating > >nested aiocbs. Or we could just make the sg aio methods fake-ioveced > >which is the solution I had before your split, always adding a > >one-element iovec to the scsi-generic request structure. > > > > I'd go for having everything vectored. It's how non-1962 hardware works. Yeah, that's what I did for regular block I/O in my series. scsi-generic is a little different beast, though. qemu uses the legacy (not sure if it's formally deprecated) read/write support on /dev/sg which doen't support vectored I/O. If we want to use vectored I/O with sg we'd have to use the SG_IO ioctl (which also has the advantage of working with all sd/sr/ide/etc block devices). But supporting that would probably require very different APIs then the current (aio-) read/writeish one.