On 11/17/09 12:59, Paul Brook wrote:
On Tuesday 17 November 2009, Gerd Hoffmann wrote:
Changes:
* Move from open-coded lists to QTAILQ macros.
* Move the struct elements to the common data structures
(SCSIDevice + SCSIRequest).
* Fix request cleanup in the destroy callback.
This feels like the abstraction boundaries wrong. If the request chain fields
are in common structures then I'd also expect the allocation and linking code
to be common.
Isn't that easy because scsi-disk and scsi-generic keep a pool of unused
request structures. I didn't change that for now, although I've
considered dropping it. Not sure how important it is these days, malloc
implementations don't do slow+stupid list walks any more ...
When the pools are gone we can easily move scsi_remove_request() to
common code and have the common scsi_req_init() function handle
allocation and linking too (and probably name it 'alloc' or 'get').
cheers,
Gerd