From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MLghh-0003sZ-RB for qemu-devel@nongnu.org; Tue, 30 Jun 2009 13:01:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MLghd-0003pi-7p for qemu-devel@nongnu.org; Tue, 30 Jun 2009 13:01:09 -0400 Received: from [199.232.76.173] (port=49599 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MLghc-0003pS-Sj for qemu-devel@nongnu.org; Tue, 30 Jun 2009 13:01:04 -0400 Received: from verein.lst.de ([213.95.11.210]:50090) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1MLghc-0008Bg-94 for qemu-devel@nongnu.org; Tue, 30 Jun 2009 13:01:04 -0400 Date: Tue, 30 Jun 2009 19:01:00 +0200 From: Christoph Hellwig Subject: Re: [Qemu-devel] [PATCH] ATAPI pass through Message-ID: <20090630170100.GA1678@lst.de> References: <200906301634.53197.alexandre.bique@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200906301634.53197.alexandre.bique@citrix.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bique Alexandre Cc: qemu-devel@nongnu.org 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