Re: PATCH: cdrecord: avoiding scsi device numbering for ide devices

Jens Axboe
2004-08-05T12:44:28Z

On Thu, Aug 05 2004, Joerg Schilling wrote:
>
> >From: Jens Axboe <axboe@suse.de>
>
> >> this is the reason why the patch forces the ata (atapi?) driver. no
> >> SCSI driver or configuring of ide-scsi required.
>
> >Maybe newer version broke then. Until very recently, cdrecord worked
> >just fine as-is and used SG_IO access method when you used open by
> >device name. Which was just the way we wanted it.
>
> >If that doesn't work now, I suggest you take it up with Joerg. It's a
> >problem with his program.
>
> It's a problem caused by the design in the Linux kernel and not a problem of
> libscg or cdrecord.
>
> The point is that Linux constantly invents new ugly and unneeded things and
> after I found a workaround, people try to prevent the workaround from
> being usable.

It's been bad in the past, I agree. But the advertised way to work with
this hasn't changed in the past few years, and was and is still sg v3.
So you should support that through read(2)/write(2) to /dev/sg*, or
through SG_IO ioctl to the device. The latter is recommended since
currently works for all devices, plus it's the simpler (and good enough)
interface to use for cdrecord since it doesn't require queuing.

> In 1998, I did send a patch against the sg.c driver that introduced
> everything that is needed for Generic SCSI transport. I am still
> waiting for even the needed features to appear........

If you have issues with SG_IO, please feel free to address them. If they
are valid, I'd love to help you get it fixed.

--
Jens Axboe