Page MenuHomeFreeBSD

fsck_ffs(8): fix divide by zero when debug messages are enabled
ClosedPublic

Authored by rew on May 20 2021, 9:17 PM.

Details

Summary

When running fsck_ffs -d on a gjournal'ed filesystem, it's possible
that totalreads is greater than zero when no cache lookup has been
done - causing a divide by zero and producing the following error:

Floating point exception (core dumped)

Only print buffer cache debug message when a cache lookup has been done.

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.