Re: What still uses the block layer?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Rob Landley <rob@...>
Cc: <linux-kernel@...>, <linux-scsi@...>
Date: Monday, October 15, 2007 - 6:32 am

2007/10/15, Rob Landley <rob@landley.net>:

     How do you define real SCSI ? The definition of SCSI in the kernel is
  "a device that accept the SCSI command set" (more precisely "a
  suitably large subset a the SCSI command set". It looks as if you
  definition of SCSI is "a device that is sold with written SCSI on the
  box and that attaches to a card with SCSI written on the box"; is it
  correct ?

    The host is the expansion card that connects the device to the
  motherboard. If it is emulated this means that it is not a native
  SCSI host. In case of USB drives/keys this is probably the case.


     You are really looking like you are out for a fight.


     I don't understand this one.


      Your objection is interesting. It is lost in the middle of e-mails which,
  to the untrained eye, look like you are trying to fight everyone and
  everybody.


     As far as I can tell the hard drives do not have serial numbers easily
  readable by the kernel (I think it's only printed on the label). However
  (feverishly plugging his USB key in the laptop), you can tell how a drive
  is attached to the motherboard:

Laptop's SATA drive:
cognac $ readlink /sys/block/sda/device
../../devices/pci0000:00/0000:00:12.0/host0/target0:0:0/0:0:0:0

USB key:
coghac $ readlink /sys/block/sdb/device
../../devices/pci0000:00/0000:00:13.5/usb6/6-3/6-3:1.0/host4/target4:0:0/4:0:0:0

    By the way, did you look in /dev/disk/by-id (udev magic) ? It's probably
  not very difficult to reconfigure udevd to not read the UUIDs of the
  partitions and not spin up your holy external disk at each reboot. I think
  the one that is spinning up your holy external hard drive is udevd. By
  the way, how many time do you reboot instead of resuming from
  suspend-to-disk ? Have you given a try to TuxOnIce ?

    If you had asked your first question in a way similar to this one:

    "I have my laptop hard drive that shows as different devices depending
  whether there are USB drives plugged in or not, what should I do ?
  Shouldn't SATA/USB drives/PATA/iSCSI drives be enumerated in different
  queues ?"

    You would probably have received more interesting answers and less
  insults.


    Indeed. Propose a solution. Remember that it is indispensable that all
  goes through the SCSI layer(s) because all those devices respond to the
  same command set thus you do not want several implementations of
  the routines.


     Once again. You are so aggressive in your asking that it does not
  lead to an interesting discussion.


     Out for a fight ?


     Each device is different from each other (they do not share their atoms).
  Where do you want to put the line between using a single driver for them
  or not ?

     In that case the sd driver registers all disk-like devices that respond to
  (a suitably large subset of) the SCSI command set. It is an improvment
  to have all devices share a driver because if you improve it, you improve
  it for all the devices; if you debug it, you debug it for all your
devices; you
  use less memory.

   The enumeration of the devices is not the nightmare you are trying to
  imply. If it is hard in your particular case, many people are likely to want
  to help you. Just try to ask politely, without shouting, without saying that
  block layer is useless, without saying that device enumeration in the
  SCSI layer (or sd device driver) is braindead. If you want to propose a
  change, propose it: "we could also do it that other way". "The way the
  SCSI disk is attached should show in the name of the device". I suspect
  this will be refused anyway because that would mean that you need
  a (series of) major block number(s) for each type of SCSI attachment
  (if the device has not a different major block number, there is nothing
  short of udev that can give it a different name).


     Out for a fight ?


    How long before eSATA enabled laptops (with eSATA enumerated
  before SATA obviously) ?


     You should have told it in the first place -- with cooler tone.


     It' also easier because you have the MAC address to help.


     There is also the need to ensure that each distribution loads the ahci
  driver before any other SCSI or emulated SCSI host. It looks as if Ubuntu
  does not do it that way (I've tried to understand the module probing logic
  in the initramfs but have miserably failed; too much magic probably).

    Remember that udevd starts your holy external hard disk, not the
  UUID in /etc/fstab (obiously if you have an UUID in fstab, you need udev
  to probe for it, but it'll do it regardless of whether or not UUSID is present
  in fstab.

    Regards,

          Loïc
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
What still uses the block layer?, Rob Landley, (Thu Oct 11, 9:11 pm)
Re: What still uses the block layer?, Matthew Wilcox, (Sat Oct 13, 6:05 pm)
Re: What still uses the block layer?, James Bottomley, (Sun Oct 14, 6:24 pm)
Re: What still uses the block layer?, Luben Tuikov, (Sun Oct 14, 8:45 pm)
Re: What still uses the block layer?, Rob Landley, (Mon Oct 15, 2:51 am)
Re: What still uses the block layer?, Luben Tuikov, (Mon Oct 15, 4:37 am)
Re: What still uses the block layer?, Rob Landley, (Sun Oct 14, 7:45 pm)
Re: What still uses the block layer?, James Bottomley, (Mon Oct 15, 9:10 am)
Re: What still uses the block layer?, Rob Landley, (Mon Oct 15, 5:51 pm)
Re: What still uses the block layer?, Greg KH, (Mon Oct 15, 2:00 am)
Re: What still uses the block layer?, Rob Landley, (Mon Oct 15, 4:36 am)
Re: What still uses the block layer?, Greg KH, (Mon Oct 15, 1:25 pm)
Re: What still uses the block layer?, Rob Landley, (Mon Oct 15, 6:54 pm)
Re: What still uses the block layer?, Jeff Garzik, (Mon Oct 15, 2:46 pm)
Re: What still uses the block layer?, Bill Davidsen, (Wed Oct 17, 7:43 pm)
Re: What still uses the block layer?, Stefan Richter, (Tue Oct 16, 2:33 am)
Re: What still uses the block layer?, Matthew Wilcox, (Mon Oct 15, 2:00 pm)
Re: What still uses the block layer?, Arjan van de Ven, (Mon Oct 15, 10:00 am)
Re: What still uses the block layer?, Matthew Garrett, (Mon Oct 15, 2:56 pm)
Re: What still uses the block layer?, Alan Cox, (Mon Oct 15, 9:08 am)
Re: What still uses the block layer?, Christoph Hellwig, (Mon Oct 15, 4:52 am)
Re: What still uses the block layer?, Theodore Tso, (Sun Oct 14, 9:45 pm)
Re: What still uses the block layer?, Rob Landley, (Mon Oct 15, 4:04 am)
Re: What still uses the block layer?, , (Wed Oct 17, 1:34 am)
Re: What still uses the block layer?, , (Wed Oct 17, 2:07 am)
Re: What still uses the block layer?, Theodore Tso, (Mon Oct 15, 9:21 am)
Re: What still uses the block layer?, , (Mon Oct 15, 10:51 pm)
Re: What still uses the block layer?, Douglas Gilbert, (Mon Oct 15, 10:46 am)
Re: What still uses the block layer?, Alan Cox, (Mon Oct 15, 9:29 am)
Re: What still uses the block layer?, Jeff Garzik, (Mon Oct 15, 1:44 pm)
Re: What still uses the block layer?, Theodore Tso, (Mon Oct 15, 9:35 am)
Re: What still uses the block layer?, Loïc Grenié, (Mon Oct 15, 6:32 am)
Re: What still uses the block layer?, Rob Landley, (Mon Oct 15, 5:09 pm)
Re: What still uses the block layer?, Julian Calaby, (Mon Oct 15, 5:06 am)
Re: What still uses the block layer?, Rob Landley, (Mon Oct 15, 6:08 am)
Re: What still uses the block layer?, Greg KH, (Mon Oct 15, 1:33 pm)
Re: What still uses the block layer?, , (Mon Oct 15, 10:54 pm)
Re: What still uses the block layer?, Matthew Wilcox, (Tue Oct 16, 12:04 am)
Re: What still uses the block layer?, Greg KH, (Tue Oct 16, 12:21 am)
Re: What still uses the block layer?, , (Tue Oct 16, 1:00 am)
Re: What still uses the block layer?, Arjan van de Ven, (Tue Oct 16, 12:11 am)
Re: What still uses the block layer?, , (Tue Oct 16, 12:15 am)
Re: OOM killer gripe (was Re: What still uses the block laye..., Eric W. Biederman, (Mon Oct 15, 11:55 pm)
Re: OOM killer gripe (was Re: What still uses the block laye..., Eric W. Biederman, (Tue Oct 16, 12:38 am)
Re: OOM killer gripe (was Re: What still uses the block laye..., Eric W. Biederman, (Tue Oct 16, 5:31 am)
Re: OOM killer gripe (was Re: What still uses the block laye..., Eric W. Biederman, (Tue Oct 16, 12:45 am)
Re: What still uses the block layer?, David Newall, (Sun Oct 14, 1:54 am)
Re: What still uses the block layer?, Stefan Richter, (Sun Oct 14, 1:46 pm)
Re: What still uses the block layer?, Rob Landley, (Sun Oct 14, 7:36 pm)
Re: What still uses the block layer?, Stefan Richter, (Mon Oct 15, 1:44 am)
Re: What still uses the block layer?, Rob Landley, (Mon Oct 15, 5:26 am)
Re: What still uses the block layer?, Wilfried Klaebe, (Mon Oct 15, 4:29 pm)
Re: What still uses the block layer?, Matthew Wilcox, (Mon Oct 15, 12:08 pm)
Re: What still uses the block layer?, Stefan Richter, (Mon Oct 15, 1:10 pm)
Re: What still uses the block layer?, , (Mon Oct 15, 11:06 pm)
Re: What still uses the block layer?, Alan Cox, (Tue Oct 16, 6:19 am)
Re: What still uses the block layer?, , (Tue Oct 16, 3:54 pm)
Re: What still uses the block layer?, Matthew Wilcox, (Tue Oct 16, 3:54 pm)
Re: What still uses the block layer?, , (Tue Oct 16, 4:55 pm)
Re: What still uses the block layer?, Gabor Gombas, (Wed Oct 17, 5:48 am)
Re: What still uses the block layer?, , (Wed Oct 17, 5:04 pm)
Re: What still uses the block layer?, Stefan Richter, (Wed Oct 17, 1:23 pm)
Re: What still uses the block layer?, Alan Cox, (Tue Oct 16, 5:49 pm)
Re: What still uses the block layer?, Theodore Tso, (Tue Oct 16, 4:34 pm)
Re: What still uses the block layer?, Stefan Richter, (Tue Oct 16, 4:56 pm)
Re: What still uses the block layer?, Stefan Richter, (Tue Oct 16, 4:18 pm)
Re: What still uses the block layer?, Stefan Richter, (Tue Oct 16, 1:56 am)
Re: What still uses the block layer?, Tilman Schmidt, (Sun Oct 14, 6:35 pm)