Page MenuHomeFreeBSD

Minor improvements for vtruncbuf()
ClosedPublic

Authored by kib on Dec 31 2023, 8:57 PM.
Tags
None
Referenced Files
F150958501: D43261.id.diff
Sun, Apr 5, 4:56 AM
Unknown Object (File)
Sat, Apr 4, 7:08 PM
Unknown Object (File)
Mar 4 2026, 5:27 PM
Unknown Object (File)
Mar 1 2026, 10:22 PM
Unknown Object (File)
Feb 10 2026, 1:12 AM
Unknown Object (File)
Feb 2 2026, 2:02 PM
Unknown Object (File)
Jan 31 2026, 12:31 PM
Unknown Object (File)
Jan 26 2026, 10:23 AM
Subscribers

Details

Summary
vtruncbuf: add a comment explaining the purpose of the loop
vtruncbuf: improve the check for meta buffer

Revision e99215a614675 reorganized the code in vtruncbuf(), and moved
the logic to flush meta buffers into a dedicated loop. While doing it,
the condition was changed from bp->b_lblkno < 0 (to handle) into
bp->b_lblkno > 0 (to skip), which causes buffer at lblkno to needlessly
flush.

Diff Detail

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