lkml.org 
[lkml]   [2005]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence
From
Date
On Sat, 2005-03-26 at 09:27 +0200, Kai Makisara wrote:
> I fully agree that doing done() correctly _is_ a problem, especially when
> the SCSI subsystem evolves and the high-level driver writers do not follow
> the development closely enough.
>
> One solution to these problems would be to let the drivers still use
> scsi_do_req() and their own done() function, but create two
> (three) helpers:
> - one to be called at the beginning of done(); it would do what needs to
> be done here but lets the driver to do some special things of its own if
> necessary
> - one to be called to wait for the request to finish
> (- one to do scsi_ro_req() and the things necessary before these)

Yes. The drivers that use it just need visiting with a big hammer.
However, our character ULDs (st and sg) use it because they try to
simulate fire and forget in the async write path (That's the only time
you actually don't wait on completion for scsi_do_req).

This comes about because the mid-layer is block oriented, so you can't
use any of the read/write machinery. We could fix this by having a
generic character tap to a block queue for use in cases like SCSI where
the underlying driver uses block queues even if the actual device isn't
a block device.

Essentially, the character tap would simply submit a stream of reads and
writes through the block queue. Then we could modify st and sg to use
an identical framework to the other ULDs ... you get a setup API and a
returning command API which are called for every I/O and the block layer
gets to handle the async/not-async pieces.

James


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-06 13:30    [W:0.053 / U:0.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site