git: 50dc4c7df415 - main - When a superblock integrity check fails, report the cause of the failure.

From: Mark Millard <marklmi_at_yahoo.com>
Date: Sat, 25 Jun 2022 22:47:26 UTC
Kirk McKusick <mckusick_at_FreeBSD.org> wrote on
Date: Fri, 24 Jun 2022 00:40:20 UTC :

> The branch main has been updated by mckusick:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=50dc4c7df4156863148e6a9609c03e852e2aeb35
> 
> commit 50dc4c7df4156863148e6a9609c03e852e2aeb35
> Author:     Kirk McKusick <mckusick@FreeBSD.org>
> AuthorDate: 2022-06-24 00:39:05 +0000
> Commit:     Kirk McKusick <mckusick@FreeBSD.org>
> CommitDate: 2022-06-24 00:39:53 +0000
> 
>     When a superblock integrity check fails, report the cause of the failure.
>     
>     No functional change intended.
>     
>     MFC after:   1 month (with 076002f24d35)
>     Differential Revision: https://reviews.freebsd.org/D35219
. . .

One of the people active on the freebsd-arm list (Bob Prohaska)
has been reporting problems with UFS rejections and now that
there are error messages for the superblock check failures,
more can be seen after his update that includes those changes.

(Note: Recently at least one of Bob P.'s list Emails seem not
have shown up on freewbsd-arm but I'm getting copies from being
explicitly listed. In this case the message made it to the
list so I can refer to it.)

https://lists.freebsd.org/archives/freebsd-arm/2022-June/001453.html

reports now getting messages like:

UFS2 superblock failed: fs->fs_csaddr (806456) != cgdmin(fs, 0) (5056)
UFS2 superblock failed: fs->fs_csaddr (806456) != cgdmin(fs, 0) (5056)
. . . (lots of them) . . .

The more overall sequence, being:

. . .
Root mount waiting for: CAM
da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
da0: <ASMT ASM105x 0> Fixed Direct Access SPC-4 SCSI device
da0: Serial Number 12345678D558
da0: 40.000MB/s transfers
da0: 953869MB (1953525168 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>
UFS2 superblock failed: fs->fs_csaddr (806456) != cgdmin(fs, 0) (5056)
. . .
UFS2 superblock failed: fs->fs_csaddr (806456) != cgdmin(fs, 0) (5056)
Mounting from ufs:/dev/da0s2a failed with error 22; retrying for 3 more seconds
UFS2 superblock failed: fs->fs_csaddr (806456) != cgdmin(fs, 0) (5056)
. . .
UFS2 superblock failed: fs->fs_csaddr (806456) != cgdmin(fs, 0) (5056)
Mounting from ufs:/dev/da0s2a failed with error 22: Invalid fstype.

Loader variables:
  vfs.root.mountfrom=ufs:/dev/da0s2a
  vfs.root.mountfrom.options=rw

Manual root filesystem specification:
  <fstype>:<device> [options]
      Mount <device> using filesystem <fstype>
      and with the specified (optional) option list.

    eg. ufs:/dev/da0s1a
        zfs:zroot/ROOT/default
        cd9660:/dev/cd0 ro
          (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /)

  ?               List valid disk boot devices
  .               Yield 1 second (for background tasks)
  <empty line>    Abort manual input


Booting an older main-n255816-e26ef41f799 kernel (May 25 build date)
stops in single user. I'll not repeat the details here but 4 of those
messages occur before getting to the single user prompt. Exiting
single user mode gets to multi-user.

(I'll ignore the network connectivity issue that is mentioned, which,
as I remember, predates this UFS rejection issues but is ongoing.)

See the message referenced:

https://lists.freebsd.org/archives/freebsd-arm/2022-June/001453.html

for more. Bob would like to get back into a good state for his UFS
partition. Such related notes might help others as well.

===
Mark Millard
marklmi at yahoo.com