[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/54882: Stange default disklabels generated for non-512 byte disks
The following reply was made to PR kern/54882; it has been noted by GNATS.
From: mlelstv%serpens.de@localhost (Michael van Elst)
Subject: Re: kern/54882: Stange default disklabels generated for non-512 byte disks
Date: Wed, 22 Jan 2020 11:37:00 -0000 (UTC)
martin%duskware.de@localhost (Martin Husemann) writes:
> > You should see an error message printed by the kernel why readdisklabel()
> > failed.
> Duh - indeed. There was a bogus MBR in the image file:
> vnd0: mbr partition exceeds disk size
Awful heuristics in subr_disk_mbr.c.
Without MBR it would search for a disklabel at the disk start and return
no error when none is found.
With a valid MBR it would search for a disklabel in a NetBSD partition and
return no error when none is found.
With an invalid MBR it still looks for a disklabel at the disk start, but
now it returns an error when none is found.
With no disklabel read and no error you get a conventional default label,
with error you get the "historic" label.
The historic behaviour in vnd should be removed, then it can also be
refactored to use common disk driver code.
And the heuristics for finding a disklabel should be simplified. But
don't ask me who still relies on them and then needs to move.
Michael van Elst
"A potential Snark may lurk in every tree."
Main Index |
Thread Index |