From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MLhZH-0003R5-Ra for qemu-devel@nongnu.org; Tue, 30 Jun 2009 13:56:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MLhZD-0003Ov-83 for qemu-devel@nongnu.org; Tue, 30 Jun 2009 13:56:31 -0400 Received: from [199.232.76.173] (port=40916 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MLhZD-0003Op-4T for qemu-devel@nongnu.org; Tue, 30 Jun 2009 13:56:27 -0400 Received: from smtp.eu.citrix.com ([62.200.22.115]:12669) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MLhZC-0000Nd-GG for qemu-devel@nongnu.org; Tue, 30 Jun 2009 13:56:26 -0400 From: Bique Alexandre Subject: Re: [Qemu-devel] [PATCH] ATAPI pass through Date: Tue, 30 Jun 2009 18:55:42 +0100 References: <200906301634.53197.alexandre.bique@citrix.com> <20090630170100.GA1678@lst.de> In-Reply-To: <20090630170100.GA1678@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200906301855.42855.alexandre.bique@citrix.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: "qemu-devel@nongnu.org" On Tuesday 30 June 2009 18:01:00 Christoph Hellwig wrote: > On Tue, Jun 30, 2009 at 04:34:53PM +0100, Bique Alexandre wrote: > > - I exported the data structure BDRVRawState from raw-posix.c in > > raw-posix.h, because I use the file descriptor of the bsg device to poll, > > write and read. Maybe there is a better solution, but I didn't find what > > I was looking for in block.h. > > The way we do scsi passthrough (and ATAPI really just is SCSI > passthrough over ATA with a slightly special command set) is to call > into the ioctl/aio_ioctl methods of the block driver and let that do > the actual I/O. I think your patch would be simpler and cleaner by > following that model I can switch to aio_ioctl, and use CDROM_SEND_PACKET ioctl. Is it possible to send multiple requests at the same time with aio_ioctl ? When CONFIG_AIO is not available ? Thanks. -- Alexandre Bique