Page MenuHomeFreeBSD

Minor improvements for vtruncbuf()
ClosedPublic

Authored by kib on Dec 31 2023, 8:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 4, 5:27 PM
Unknown Object (File)
Sun, Mar 1, 10:22 PM
Unknown Object (File)
Tue, Feb 10, 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
Unknown Object (File)
Jan 25 2026, 1:32 PM
Unknown Object (File)
Dec 30 2025, 8:09 PM
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