From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIMYJ-0006Ua-R4 for qemu-devel@nongnu.org; Mon, 24 Oct 2011 11:35:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RIMYE-0004D9-Tu for qemu-devel@nongnu.org; Mon, 24 Oct 2011 11:35:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31873) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIMYE-0004Cu-GS for qemu-devel@nongnu.org; Mon, 24 Oct 2011 11:34:58 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9OFYvoZ027070 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 24 Oct 2011 11:34:57 -0400 Message-ID: <4EA5865C.3050604@redhat.com> Date: Mon, 24 Oct 2011 17:38:04 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1318503845-11473-1-git-send-email-pbonzini@redhat.com> <1318503845-11473-36-git-send-email-pbonzini@redhat.com> <4EA5842F.8050807@redhat.com> <4EA5841A.2080406@redhat.com> In-Reply-To: <4EA5841A.2080406@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 35/35] scsi-disk: add scsi-block for device passthrough List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org Am 24.10.2011 17:28, schrieb Paolo Bonzini: > On 10/24/2011 05:28 PM, Kevin Wolf wrote: >>> scsi-block is a new device that supports device passthrough of Linux >>>> block devices (i.e. /dev/sda, not /dev/sg0). It uses SG_IO for commands >>>> other than I/O commands, and regular AIO read/writes for I/O commands. >>>> Besides being simpler to configure (no mapping required to scsi-generic >>>> device names), this removes the need for a large bounce buffer and, >>>> in the future, will get scatter/gather support for free from scsi-disk. >>>> >>>> Signed-off-by: Paolo Bonzini >> >> This doesn't seem to use much of scsi-disk, so what about exporting >> &scsi_disk_reqops and adding a separate file scsi-block.c? Would make >> things a bit more symmetrical between scsi-disk and scsi-generic. >> >> Or will future patches add code that depends on internal interfaces of >> scsi-disk? > > It already uses some internal interfaces: scsi_initfn, scsi_disk_reset, > scsi_destroy, sizeof(SCSIDiskState). Right... I don't like it much in scsi-disk.c, but what can you do. Exporting everything wouldn't be nicer. Kevin