Subject: Re: two disks, two controlers, same bad block
To: der Mouse <>
From: Richard Earnshaw <>
List: tech-kern
Date: 03/27/2006 23:32:15
On Mon, 27 Mar 2006 13:13:59 CDT, der Mouse wrote:
> > how much of an impact will that have on resources; "for every block
> > read or write check if it requires LBA48," sounds kinda heavy.
> We *already* do that.  It's just a question of drawing the line at
> 0xfffffff vs 0x10000000 - Seagate draws it one block earlier than they
> should, and the quirk entry makes our driver match that.  The quirk
> entry does complicate that check slightly, adding another bit test.
> If you're that worried about efficiency, try changing the > to >= (to
> make LBA48 kick in with sector 0xfffffff instead of 0x10000000) and
> dropping the quirk.  See if it makes a measurable difference.  (I doubt
> it will, but would love to hear from anyone with real measured data.)
> It might break a non-LBA48-capable disk that's exactly 128G long, but I
> am inclined to doubt any such exists.

Urm, how many non-LBA48 capable disks are there out there that have 
exactly 2^32 sectors?

I suspect the answer is none, so why don't we always treat 0xffffffff as 
an address that needs a LBA48 access on all disks and get rid of the quirk 
entirely.  Having the quirk costs the kernel time every time we do the 
check (not much, admittedly, but some) and as we've already established, 
the cost of doing the longer access only applies to 1 sector on the entire