tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bad144 - how useful still? Because it's annoyingly ubiquitous.



> On May 30, 2026, at 6:37 AM, Jason Thorpe <thorpej%me.com@localhost> wrote:
> 
> 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().

Actually, let me clarify that just a bit more: The code in _wdc_ata_bio_start() would see D_BADSECT in the in-memory copy of the disklabel (in the flags field), which if course would come from reading the on-disk disklabel.

The issue is that the “bad144intern()” function that actually populates the “badsect[]” array used in _wdc_ata_bio_start() is only called from the DIOCSBAD handling in wdioctl().  So _wdc_ata_bio_start() would see D_BADSECT, consult the “badsect[]” array, and then find it to be empty.

-- thorpej



Home | Main Index | Thread Index | Old Index