Fix backward compatibility with UFS1 filesystems created before June 2002
The code to handle compatibility with old filesystems exists and does
the right things. The loss of compatibility was introduced 2.5 years ago
when the superblock integrity checks were added. The problem is that the
compatibility code was being run after the new integrity checks rather
than before them.
The reason that it has taken so long to show up is because it only
affected filesystems created before UFS2 got added in June 2002 and
that had never been mounted read-write (as their superblocks would
be updated by the compatibility code if they could be written).
Hence the problem was not apparent until someone tried to mount a
pre-2002 virgin UFS1 filesystem image.
See the Pahabricator review for more details.
Reviewed-by: kib
Tested-by: Peter Holm
MFC-after: 1 week
Differential-Revision: https://reviews.freebsd.org/D48472