[SCSI] sd: handle bad lba in sense information
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Sat, 2 Feb 2008 22:06:23 +0000 (16:06 -0600)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Fri, 8 Feb 2008 00:02:41 +0000 (18:02 -0600)
Some devices report medium error locations incorrectly.  Add guards to
make sure the reported bad lba is actually in the request that caused
it.  Additionally remove the large case statment for sector sizes and
replace it with the proper u64 divisions.

Tested-by: Mike Snitzer <snitzer@gmail.com>
Cc: Stable Tree <stable@kernel.org>
Cc: Tony Battersby <tonyb@cybernetics.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>

No differences found