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.
Tags
None
Referenced Files
F102691621: D30370.diff
Fri, Nov 15, 10:27 PM
Unknown Object (File)
Fri, Nov 8, 9:01 PM
Unknown Object (File)
Thu, Nov 7, 12:31 PM
Unknown Object (File)
Wed, Nov 6, 1:08 PM
Unknown Object (File)
Tue, Nov 5, 10:53 AM
Unknown Object (File)
Sat, Nov 2, 12:25 AM
Unknown Object (File)
Sat, Nov 2, 12:24 AM
Unknown Object (File)
Sat, Nov 2, 12:24 AM
Subscribers

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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable