cdrecord hangs my computer
Quoted 8 lines · Linus Torvalds
Quoted 7 lines · Wakko Warner
Quoted 6 lines
One is just plain confusion - anybody who uses cdrecord has either been
confused by the silly SCSI numbering (while "dev=/dev/hdc" is not confusing at all, and uses the same device you use for mounting the thing etc).
Quoted 6 lines
Quoted 2 lines
Actually, it would be nice if I could use dev=/dev/scd0. I do have a scsi burner (and an ide one too)
It _should_ just work these days. Anything that uses "
cdrom_ioctl()" should automatically get the SCSI command translation code (which isn't part of the scsi driver).
Yes dev=/dev/scd0 should work for "real" SCSI (and USB, IEEE1394 and sATA [via libata] attached) cd/dvd players in lk 2.6. Copying the SG_IO ioctl and friends into the block
layer isn't exactly pretty in lk 2.6. No doubt I'll be hearing from the author of cdrecord about some of the rough edges. Basically cdrecord is tricked into believing it is talking to an sg device.
One rough edge is cdrecord's use of the SCSI_IOCTL_GET_IDLUN ioctl which encodes bus/channel/target/lun into an integer. cdrecord uses this for its dev=<n,m,q> notation. The drivers/block/scsi_ioctl.c implementation returns 0 in all cases. So if you have 2 or more ATAPI cd/dvd burners cdrecord's dev=<n,m,q> usage won't be able to differentiate.
ide-scsi has always had problems (I spent about a week on it and gave up with only a few minor fixes to report) but it may be a useful "insurance" driver to keep around in lk 2.6 . [It is also needed for ATAPI tapes so its deprecatation warning might like to take into account the peripheral device type.]
Yes the bus/channel/target/lun notation is dated but it has been in place for around 15 years (in the Sun's bus/target/lun form). These days the "bus/channel" component is defined by the host OS, the "target" by the transport (see "object identifiers" in SAM-3 Annex A). Only the "lun" is defined within the SCSI^H^H^Htorage Architecture Model (SAM-3 section 4.9 in the latest draft).
Quoted 1 line
But hey, the scsi layer confuses me. Less than it used to, but still.
Well making the scsi layer handle some of the the most sophisticated storage devices and some of the most brain damaged at the same time is proving quite a challenge. With libata (and later SAS) sATA disks will be getting to the application space via the sd driver. And how will object storage devices fit into Linux's block-centric I/O architecture?
Doug Gilbert
Quoted 6 lines · Douglas Gilbert
Yes dev=/dev/scd0 should work for "real" SCSI (and USB, IEEE1394 and sATA [via libata] attached) cd/dvd players in lk 2.6. Copying the
SG_IOioctl and friends into the block
layer isn't exactly pretty in lk 2.6. No doubt I'll be hearing from the author of cdrecord about some of the rough edges. Basically cdrecord is tricked into believing it is talking to an sg device.
It's not tricked, cdrecord should not care about device type. All it needs to care about is SG_IO working or not.
Quoted 6 lines
One rough edge is cdrecord's use of the
SCSI_IOCTL_GET_IDLUNioctl which encodes bus/channel/target/lun into an integer. cdrecord uses this for its dev=<n,m,q> notation. Thedrivers/block/scsi_ioctl.cimplementation returns 0 in all cases. So if you have 2 or more ATAPI cd/dvd burners cdrecord's dev=<n,m,q> usage won't be able to differentiate.
Not sure I see any merrit in supporting that at all, but if so it would be pretty easy to fake these.
Quoted 6 lines
ide-scsi has always had problems (I spent about a week on it and gave up with only a few minor fixes to report) but it may be a useful "insurance" driver to keep around in lk 2.6 . [It is also needed for ATAPI tapes so its deprecatation warning might like to take into account the peripheral device type.]
It does, the 2.6 warning printed is just for CDROM devices.
Quoted 7 lines
Well making the scsi layer handle some of the the most sophisticated storage devices and some of the most brain damaged at the same time is proving quite a challenge. With libata (and later SAS) sATA disks will be getting to the application space via the sd driver. And how will object storage devices fit into Linux's block-centric I/O architecture?
What makes you say that Linux has a block-centric IO architecture? 2.6 block io layer is quite happy to do byte-granularity SCSI commands for you.
Signature · 1 line
Jens Axboe
Quoted 4 lines · Jens Axboe
What makes you say that Linux has a block-centric IO architecture? 2.6 block io layer is quite happy to do byte-granularity SCSI commands for you.
Indeed.
I don't think some people really _realize_ how much cleaner and generic the generic block layer is compared to SCSI.
Yes, we call it "block layer" for historical reasons, but the fact is, it's a "packet command" layer with knowledge of blocking (ie the merging and sorting code has the ability to merge packets that are marked as mergeable and fit certain criteria).
And the reason it is so much superior to SCSI is that it's designed to be generic enough that it doesn't _care_ what the device is. The generic block layer can work with MD, with floppy disks, with traditional SCSI devices, and it just _works_.
The block layer doesn't have any silly assumptions about what it is talking to, although it has some helper functions that are directly aimed at a block device that implements a SCSI-like packet command set. But they literally are helper functions - the block layer does not force your floppy device to pretend that it is some kind of strange SCSI disk when it isn't.
Linus