Re: sg driver and Fedora Core 2

Alan Cox
2004-05-29T17:36:46Z

On Sat, May 29, 2004 at 01:27:58PM -0400, Jeff Garzik wrote:
> Really what needs to happen is a generic userland tap attaches to a
> chrdev, issues an ioctl(2) to attach to a request_queue, and then does
> read(2)/write(2)/mmap(2) to communicate with the request_queue.

Is there a reason that couldn't be part of the block layer sysfs in 2.7.x

> :)
> Call it /dev/bsg, or somesuch.

Except that I wonder if it should be in sysfs I agree entirely.

> OTOH, the SG_IO ioctl does eliminate the userland app needing to
> worry about _any_ target/addressing information, since that is implicit
> in the dentry pointing to the blkdev's inode.

It makes it very hard to scan scsi busses, which is what the flash burner
app does, and what xsane does (although sane survives ok because there
are no kernel scanner device drivers)

Alan