> On May 27, 2026, at 7:07 PM, Adrian Chadd <[email protected]> wrote:
> 
> On x86, IIRC only the earliest IDE drives didn't do bad block remapping?
> I'm pretty sure I needed it on FreeBSD and NetBSD way back when for MFM/RLL
> drives were still cheap and plentiful and being thrown out for IDE drives.

TL;DR -
And so, as it turns out, the bad144 support in the ATA disk driver has been 
broken for *ages*.

Details -
The “wd” driver supports bad144 by of “internalizing” the bad144 table into an 
ascending list of LBAs, which it then consults in _wdc_ata_bio_start().  If an 
LBA what would be part of a given transfer is in that list, it falls back to 
single-sector I/O for the transfer and when it finally gets to the sector 
that’s in the list, performs the block remap for that sector.  All 
well-and-good.

Except.

Nothing was populating that list.  (*lol*)

I mean, if someone ran bad144(8) it might have populated it once.  But upon 
reboot, nothing would repopulate it from the bad144 table on-disk, read in as 
part of readdisklabel().

I am thus led to conclude that no one will miss it if I remove it from the ATA 
code completely.

-- thorpej

Reply via email to