Joerg Schilling wrote:
Phillip Susi <[email protected]> wrote:
Joerg Schilling wrote:
I am sorry to see your recent dicussion style.
I was asking a question and I did get a completely useless answer as
any person who has some basic know how Linux SCSI would know that
doing a stat("/dev/sg*", ...) will not return anything useful.
It certainly does return something useful, just not what you are looking
for. It does not return information that allows you to cleanly build
your bus:device:lun view of the world, but it does return sufficient
information to enumerate and communicate with all devices in the
system. Is that not sufficient to be able to implement cdrecord? If it
is, then the real issue here is that you want Linux to conform to the
bus:device:lun world view, which it seems many people do not wish to do.
It does not allow libscg to find all devices.
Maybe it would be more constructive if you were to make a good argument
for why the bus:device:lun view is better than /dev/*, but right now it
seems to me that they are just two different ways of doing the same
thing, and you prefer one way while the rest of the Linux developers
prefer the other.
It would help if someone would give arguments why Linux does treat all
SCSI devices equal, except for ATAPI transport based ones.
Mostly historic, I guess. When IDE drivers first got implemented, ATAPI
wasn't really considered thoroughly and later when generic SCSI command
support became necessary it was added by bridging ATAPI devices over to
SCSI using ide-scsi. People didn't like ide-scsi very much for good
reasons - special boot parameter, confusing, needed full SCSI stack
etc... So, the hd SG_IO came.
And, yes, hd SG_IO has certain drawbacks as you pointed out. No generic
command to tape device (as no generic IDE device exists), not an
integral part of SCSI subsystem and might even contain some new bugs as
it's different new (well, was) code base. Yet, people in general seem
to find the change more beneficial and I personally like the change too.
ide-scsi is obsolete now. Going back to it just won't happen and as I
just said, yeah, some good stuff was lost in the process but others are
gained, so please accept it - there is no central repository of SCSI
command aware devices on Linux, at least at the moment. It might happen
in time but *currently* there is none. I also think it would be better
to have one but, hey, that's how the current state is and it will take
quite some amount of work and time to implement that correctly.
So, let's meet somewhere inbetween. Reserving a SCSI bus number for
ATAPI devices and generating ID/LUN for SG_IO devices isn't very
difficult and probably a good thing to have. So, unfortunately, we
won't have pretty /dev/sg* for all SCSI-aware devices, but you only have
to scan limited number of devices - /dev/sg* and /dev/hd*.
How does that sound?
--
tejun
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]