linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: linux-kernel@vger.kernel.org
Subject: Re: cdrecord hangs my computer
Date: Mon, 08 Dec 2003 19:31:09 +1000	[thread overview]
Message-ID: <3FD444DD.4080206@torque.net> (raw)

Linus Torvalds wrote:
 > On Sat, 6 Dec 2003, Wakko Warner wrote:
 > > >
 > > > 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).
 > >
 > > 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).

 > 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



             reply	other threads:[~2003-12-08  9:31 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-08  9:31 Douglas Gilbert [this message]
2003-12-11 12:56 ` cdrecord hangs my computer Jens Axboe
2003-12-11 16:15   ` Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2003-12-15 13:29 Paul Marinceu
2003-12-06 19:08 Tero Knuutila
2003-12-06 18:27 Tero Knuutila
2003-12-06 12:39 Tero Knuutila
2003-12-06  8:01 Tero Knuutila
2003-12-06  8:12 ` Linus Torvalds
2003-12-06  8:54   ` Ethan Weinstein
2003-12-06 11:59     ` Måns Rullgård
2003-12-06 13:40     ` Wakko Warner
2003-12-06 14:37       ` John Bradford
2003-12-06 21:57       ` Linus Torvalds
2003-12-06 22:02         ` Larry McVoy
2003-12-06 22:32           ` Linus Torvalds
2003-12-07 11:01             ` Eduard Bloch
2003-12-07 16:18               ` Linus Torvalds
2003-12-08 16:21                 ` bill davidsen
2003-12-08 17:46                   ` Linus Torvalds
2003-12-09 12:38                     ` Bill Davidsen
2003-12-08 17:53                   ` Valdis.Kletnieks
2003-12-08 18:53                     ` Linus Torvalds
2003-12-08 19:40                       ` Valdis.Kletnieks
2003-12-09 14:50                         ` Ian Soboroff
2003-12-09 20:42                           ` Mikael Pettersson
2003-12-08 16:24                 ` Martin J. Bligh
2003-12-08  4:36           ` Bob
2003-12-08  4:51             ` Larry McVoy
2003-12-07  0:16         ` Wakko Warner
2003-12-07  3:31           ` William Lee Irwin III
2003-12-07  4:49           ` Linus Torvalds
2003-12-08 16:13         ` bill davidsen
2003-12-08 17:38           ` Linus Torvalds
2003-12-06 16:42     ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3FD444DD.4080206@torque.net \
    --to=dougg@torque.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).