From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40980 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PKUct-00059f-2k for qemu-devel@nongnu.org; Mon, 22 Nov 2010 06:32:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PKUcf-0002OQ-5o for qemu-devel@nongnu.org; Mon, 22 Nov 2010 06:32:02 -0500 Received: from verein.lst.de ([213.95.11.210]:60222) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PKUce-0002O6-Qf for qemu-devel@nongnu.org; Mon, 22 Nov 2010 06:31:49 -0500 Date: Mon, 22 Nov 2010 12:31:44 +0100 From: Christoph Hellwig Subject: Re: [Qemu-devel] [PATCH] scsi: Use 'SCSIRequest' directly Message-ID: <20101122113144.GA2013@lst.de> References: <20101122101536.58B2EF90AE@ochil.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101122101536.58B2EF90AE@ochil.suse.de> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hannes Reinecke Cc: stefanha@gmail.com, qemu-devel@nongnu.org, nab@linux-iscsi.org, kraxel@redhat.com On Mon, Nov 22, 2010 at 11:15:35AM +0100, Hannes Reinecke wrote: > > Currently the SCSIRequest structure is abstracted away and > cannot accessed directly from the driver. This requires > the handler to do a lookup on an abstract 'tag' which > identifies the SCSIRequest structure. > With this patch the SCSIRequest structure is exposed to > the driver. This allows use to use it directly as an > argument to the SCSIDeviceInfo callback functions and > remove the lookup. > Two new callback functions 'alloc_req' and 'free_req' > are introduced, which serve to allocate a new request > and to free up resources after use. I still think having the implementations of the method named different than the method name is a bad idea. Otherwise looks good.