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
Unknown Object (File)
Sun, Mar 23, 8:20 AM
Unknown Object (File)
Feb 24 2025, 10:45 PM
Unknown Object (File)
Feb 24 2025, 6:14 PM
Unknown Object (File)
Feb 24 2025, 10:26 AM
Unknown Object (File)
Feb 23 2025, 7:07 PM
Unknown Object (File)
Dec 30 2024, 6:37 AM
Unknown Object (File)
Dec 13 2024, 12:01 PM
Unknown Object (File)
Dec 3 2024, 9:08 PM
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