Page MenuHomeFreeBSD

loader: Don't free bcache for devices of type DEVT_DISK
ClosedPublic

Authored by cperciva on Sep 30 2021, 8:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 15 2024, 3:01 PM
Unknown Object (File)
Dec 23 2023, 1:39 PM
Unknown Object (File)
Dec 22 2023, 9:47 PM
Unknown Object (File)
Dec 20 2023, 4:23 AM
Unknown Object (File)
Nov 28 2023, 2:13 PM
Unknown Object (File)
Nov 28 2023, 1:56 PM
Unknown Object (File)
Nov 28 2023, 4:44 AM
Unknown Object (File)
Nov 22 2023, 9:07 PM
Subscribers

Details

Summary

In my testing, this speeds up the loader from 513 ms to 474 ms, reduces the number of I/Os performed from 609 to 432, and reduces the total number of blocks read from 61963 to 60797.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This solves the "calling mount doesn't actually hold the disk open if there's no filesystem to mount" problem.

Seems good to my eye.

This revision is now accepted and ready to land.Sep 30 2021, 8:58 PM

The obvious flaw is about possible unfreed memory, but that shouldn't be big problem anyhow.