I am on a quest to properly unify the m68k user-land, which means addressing some long-standing ABI differences in some of the darker corners of the system. One particularly dark corner is BSD disklabel handling, which, from where I sit, is a giant toxic dumpster fire raging in the middle of the Bog of Eternal Stench. But I don’t have time for that rant this morning.
So, let’s focus on DEC STD 144, a.k.a. bad144, a.k.a. dkbad. It’s a 1970s-era bad sector remapping scheme that was already mostly obsolete by the mid-80s (ever since SCSI drives were able to maintain their own bad sector remapping information). It is totally and completely useless on any drive made since the 1990s. And yet, its tendrils infest many a NetBSD port’s BSD disklabel handling because, as far as I can tell, cargo-cultism. I figure there are a handful of legit use cases for bad144 in NetBSD still: - The vax port, obviously, but only with the really old drives. (VAX peeps please help me out here - is bad144 useful drives behind an MSCP-compliant controller?) - hp300 port maybe (for HP-IB drives). - sun3 / sun4 (Xylogics controllers and SMD drives) - i386 (ESDI, ST506, other ancient drive technologies that can plug into ISA or MCA) What I would like to propose is that bad144 be completely decoupled from “disklabel” and refactored out as set of library routines (slash module) that drivers can use. But, most importantly, get it out of the main “BSD disklabel” code path. And so, let’s discuss. -- thorpej
