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)
Mon, May 27, 10:41 PM
Unknown Object (File)
May 14 2024, 12:49 PM
Unknown Object (File)
May 7 2024, 7:07 PM
Unknown Object (File)
Apr 24 2024, 11:31 PM
Unknown Object (File)
Apr 8 2024, 3:48 AM
Unknown Object (File)
Jan 18 2024, 3:56 AM
Unknown Object (File)
Dec 23 2023, 3:07 AM
Unknown Object (File)
Dec 14 2023, 10:13 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