Hello again,

Since the sg interface offering direct I/O is still
experimental, is there any other method of performing
direct I/O to a SCSI disk? Perhaps via a module
accessing the SCSI mid-level or low (device-level)
driver? Any ideas on an elegant method of doing this,
which would work on lk 2.2.x and up?

Thanks,
-Mark

--- Douglas Gilbert <[EMAIL PROTECTED]> wrote:
> Mark Elkins wrote:
> > 
> > Hello,
> > 
> > I checked out the generic SCSI interface, but it
> > offers indirect transfers (i.e. user data is
> copied to
> > kernel buffers). I would like to perform direct
> > transfers (thus I can give a physical address, or
> a
> > virtual address which I know is mapped to a
> specific
> > physical address). Does anyone know of an
> appropriate
> > mechanism?
>  
> [snip]
> 
> > Eric Lee Green wrote:
> > > "Read the Source, Luke" seems to be the usual
> > > response to documentation
> > > problems with the Linux kernel. Rather
> unsatisfying,
> > > but (shrug).
> > >
> > > http://www.torque.net/sg/
> > >
> > > is the place where the Linux SCSI Generic driver
> > > lives. This gives you direct
> > > access to the SCSI bus via an interface to the
> > > low-level SCSI device drivers.
> > > There is sample source code there showing you
> how to
> > > do various things such
> > > as, e.g., read/write blocks of data on a hard
> drive
> > > via the low-level READ and
> > > WRITE commands.
> 
> Mark,
> Have another look at that web site and follow the
> "notes about
> the version 3 sg driver" link. The sg driver for the
> lk 2.3/2.4 
> has direct IO support in it (which may be what you
> want) but it is 
> currently conditionally compiled out. The reason for
> this was 
> problems I had with the kiobuf mechanism within the
> kernel
> several months ago. Stephen Tweedie has since
> updated "kiobuf"
> but I'm yet to retest the problem areas (and I think
> there are
> further changes coming). On the weekend I compiled
> it in just 
> to test it was still buildable (which it was). The
> relevant
> define in sg.c (showing it's current state) is:
> /* #define SG_ALLOW_DIO */
> 
> Feel free to experiment with direct transfers but it
> is probably
> important to use the kiobuf mechanism since there
> are a lot of
> thorny issues involved.
> 
> Good luck.
> 
> Doug Gilbert
> 

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]

Reply via email to