public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* READ CAPACITY 16
@ 2008-12-17 16:42 Matthew Wilcox
  2008-12-17 17:50 ` Grant Grundler
  2008-12-18 20:41 ` Douglas Gilbert
  0 siblings, 2 replies; 22+ messages in thread
From: Matthew Wilcox @ 2008-12-17 16:42 UTC (permalink / raw)
  To: linux-scsi


I'm looking at the UNMAP support again, and we now have a bit that tells
us whether the device supports UNMAP or not, it's called TPE (Thin
Provisioning Enabled) and is found in byte 14 of the result from READ
CAPACITY 16.  The problem is that we do our best to avoid calling READ
CAPACITY 16.

Presumably, there are many devices which do not support RC16.  That
isn't a problem, we can try RC16 and fall back to RC10 if the device
returns an error.  The question is what to do about devices that either
hang or take a long time to respond to an RC16 command.

This kind of problem isn't going to be limited to UNMAP.  DIF/DIX
already has to use RC16 to get the protection type.  Once 4k sector size
drives become common, we're going to want the "LOGICAL BLOCKS PER
PHYSICAL BLOCK EXPONENT" and the "LOWEST ALIGNED LOGICAL BLOCK ADDRESS"
information that RC16 returns and RC10 doesn't.  There's another 16
bytes and a couple of reserved 4-bit fields to be assigned too, and I
can imagine them getting used for new features in the future.

So what strategy should we adopt for trying harder to issue RC16?

Algorithm A (a perfect world):

Issue RC16
 -> If it fails, issue RC10
 -> If it times out, reset the device, issue RC10

Algorithm B:

Issue RC10
Issue RC16
 -> If it succeeds, use its results in preference to those from RC10
 -> If it fails, carry on with the results from RC10
 -> If it times out, reset the device, carry on with the results from RC10

Algorithm C:

As algorithm B, except:
 -> If it succeeds, use the RC10 results for LBA unless the LBA is 0xffffffff
    but use the RC16 results for TPE, PROT, etc.

Algorithm D:

Go back to T10 and say "Excuse me, kind sirs, would you mind adding an
INQUIRY bit to indicate that the device supports UNMAP?  I know you've
added a bit to RC16, but there's this nasty real world out there where
devices are apt to blow up if you send them an RC16 when they're not
expecting it."


Critiques should be expressed in the form of new algorithms.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: READ CAPACITY 16
@ 2008-12-17 17:20 bburk
  2008-12-17 17:25 ` Matthew Wilcox
  0 siblings, 1 reply; 22+ messages in thread
From: bburk @ 2008-12-17 17:20 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: linux-scsi

Algorithm D is rather pointless.  Even if T10 added an Inquiry bit,
there's no guarentee that all devices will support it, especially older
devices made before the change so even if it got put in you STILL can't
rely on it and will have to all back to other methods to get the
information that you're looking for.

You may as well get T10 to require that all devices support RC16 without
locking up for as much good as it would do.  No device should be doing
it, so the ones that aren't handling it properly are out of spec anyway.




Brent Burkholder
Extreme Protocol Solutions



-------- Original Message --------
Subject: READ CAPACITY 16
From: Matthew Wilcox <matthew@wil.cx>
Date: Wed, December 17, 2008 11:42 am
To: linux-scsi@vger.kernel.org


Go back to T10 and say "Excuse me, kind sirs, would you mind adding an
INQUIRY bit to indicate that the device supports UNMAP? I know you've
added a bit to RC16, but there's this nasty real world out there where
devices are apt to blow up if you send them an RC16 when they're not
expecting it."




^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: read capacity 16
@ 2004-12-09 14:33 Frank Borich
  2004-12-09 15:02 ` Christoph Hellwig
  0 siblings, 1 reply; 22+ messages in thread
From: Frank Borich @ 2004-12-09 14:33 UTC (permalink / raw)
  To: Frank Borich, linux-scsi

This works as expected using SGI's 2.6.5-rc3-mm4 on ia64 and on Windows
server 2003 SP1 (still a beta).
Does anyone know how to get kernels > than 2.4.19 to work ?

I tried setting max_cmd_len to 16 in hosts.c, but it doesn't change
anything.

-----Original Message-----
From: linux-scsi-owner@vger.kernel.org
[mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Frank Borich
Sent: Wednesday, December 08, 2004 3:08 PM
To: linux-scsi@vger.kernel.org
Subject: read capacity 16

Please forgive my ignorance here.  
 
I am unable to get the kernel (2.4.21) to send a read capacity 16 to a
lun that requires more than 4 bytes to specify it's last LBA,
automatically.
If I
use the sg driver to send a read capacity 16 staraight away, it works
fine.  
I am using the qlogic device driver 7.00.03 (which I believe supports 16
byte commands).  
 
When I do the bus scan (using modprobe), a READ CAPACITY 10 is sent and
FFFFFFFF is returned in LBA field, this should signal linux kernel to
send larger READ CAPACITY 16 to get correct size but it's not.  Instead
the lun is seen as 0 MB in size.  
 
I can't seem to find any good documentation on this.  Can I patch this
kernel to do this ?
 
Regards,
 
Frank
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org More majordomo info
at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 22+ messages in thread
* read capacity 16
@ 2004-12-08 21:07 Frank Borich
  0 siblings, 0 replies; 22+ messages in thread
From: Frank Borich @ 2004-12-08 21:07 UTC (permalink / raw)
  To: linux-scsi

Please forgive my ignorance here.  
 
I am unable to get the kernel (2.4.21) to send a read capacity 16 to a
lun
that requires more than 4 bytes to specify it's last LBA, automatically.
If I
use the sg driver to send a read capacity 16 staraight away, it works
fine.  
I am using the qlogic device driver 7.00.03 (which I believe supports 16
byte commands).  
 
When I do the bus scan (using modprobe), a READ CAPACITY 10 is sent 
and FFFFFFFF is returned in LBA field, this should signal linux kernel
to
send larger READ CAPACITY 16 to get correct size but it's not.  Instead
the
lun is seen as 0 MB in size.  
 
I can't seem to find any good documentation on this.  Can I patch this
kernel
to do this ?
 
Regards,
 
Frank

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2008-12-18 20:41 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-17 16:42 READ CAPACITY 16 Matthew Wilcox
2008-12-17 17:50 ` Grant Grundler
2008-12-17 18:06   ` Matthew Wilcox
2008-12-17 18:57     ` Grant Grundler
2008-12-17 19:04     ` James Bottomley
2008-12-17 19:11       ` Matthew Wilcox
2008-12-17 19:14         ` James Bottomley
2008-12-17 19:32           ` Matthew Wilcox
2008-12-17 19:36             ` James Bottomley
2008-12-17 19:49               ` Matthew Wilcox
2008-12-18  9:05     ` Boaz Harrosh
2008-12-18 14:08       ` Matthew Wilcox
2008-12-18 14:38         ` Boaz Harrosh
2008-12-18 14:49           ` Matthew Wilcox
2008-12-18 14:52           ` James Bottomley
2008-12-18 14:59             ` Boaz Harrosh
2008-12-18 20:41 ` Douglas Gilbert
  -- strict thread matches above, loose matches on Subject: below --
2008-12-17 17:20 bburk
2008-12-17 17:25 ` Matthew Wilcox
2004-12-09 14:33 read capacity 16 Frank Borich
2004-12-09 15:02 ` Christoph Hellwig
2004-12-08 21:07 Frank Borich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox