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: Matthew Wilcox <matthew@...>, <linux-kernel@...>, <linux-scsi@...>, Jens Axboe <axboe@...>, Suparna Bhattacharya <suparna@...>, Nick Piggin <piggin@...>
Date: Monday, October 15, 2007 - 9:10 am

On Sun, 2007-10-14 at 18:45 -0500, Rob Landley wrote:

OK, so could we get back to the original discussion?  The question I
think you meant to ask is "does SCSI use the block layer, and if so;
how?"

The answer is yes (just do an ls /sys/block on any scsi machine).  The
how is that it bascially uses the block layer as a service library (i.e.
most SCSI services are built on top of those already provided by block).
The email you cited was basically from our one area of confusion:  SCSI
and block both provide services to decode the SG_IO ioctl.  This is
partly historical; block and SCSI are very much intertwined; so much so
that they both tend to drive each other's development.  The programme
over the last few years has been to identify features in SCSI that
should be more generic (and hence moved to block).  SG_IO is one of
these, so we end up with the situation where Block provides this as a
service (and sr, st and sd make use of it) while the sg driver still
doesn't use what the block layer provides but rolls its own.  I think
the layout of how all this works is illustrated at a reasonably high
level here on slide 15:

http://licensing.steeleye.com/support/papers/ols_2005_slides.pdf



OK.  But that's the bit I need you to separate from your inquiry into
how SCSI actually works.  You can't go on a research trip if you allow
preconceived notions to spill over into it.

For the record, USB and firewire are SCSI at their core, so they can
never really be separated.  SATA (but not SATAPI) is a separate
protocol, so it can theoretically be separated later, and we are
actually working on that.  It's only in SCSI because there's a well
defined and standardised way to place it their (called the SAT
layer---SCSI to ATA Translation) and because it's a lot easier since
SCSI has all the features and quite a few of the necessary ones aren't
yet migrated to block.


However, by design choice, we got the SCSI layer in the kernel out of
the business of trying to provide a stable name space, since Richard
Gooch did a brilliant job of demonstrating the insoluability of that
problem.  There are many ways to identify a device (UUID being just one
of them).  It seems much more desirable to give the users the choice.
You can even have what you seem to want (SATA stably at /dev/sda) simply
by ensuring that you have a modular kernel and that libata always loads
before USB or any other storage device (not that I'd recommend doing
this, because it will fail for a large configuration, but it would work
for you).


That was because your initial inquiry came across as "I'm trying to
document this, and by the way it's rubbish".  By all means have an
inquiry and an argument, but saying effectively I don't understand this
but I know it's wrong is a guaranteed way to antagonise everyone who's
worked to try to make all of this as functional as possible.  Find out
the facts first then argue from them.


OK, so look at the diagram and the other SCSI documents and come back
for further clarification as you need it.

James


-
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)