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, Dec 30, 6:37 AM
Unknown Object (File)
Dec 13 2024, 12:01 PM
Unknown Object (File)
Dec 3 2024, 9:08 PM
Unknown Object (File)
Nov 22 2024, 6:30 PM
Unknown Object (File)
Nov 21 2024, 6:47 AM
Unknown Object (File)
Nov 20 2024, 3:37 AM
Unknown Object (File)
Nov 15 2024, 10:27 PM
Unknown Object (File)
Nov 8 2024, 9:01 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