Page MenuHomeFreeBSD

Minor improvements for vtruncbuf()
ClosedPublic

Authored by kib on Dec 31 2023, 8:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 6, 4:47 AM
Unknown Object (File)
Fri, Oct 31, 3:28 AM
Unknown Object (File)
Thu, Oct 30, 11:27 PM
Unknown Object (File)
Thu, Oct 30, 8:01 AM
Unknown Object (File)
Wed, Oct 29, 10:02 AM
Unknown Object (File)
Wed, Oct 29, 9:59 AM
Unknown Object (File)
Oct 8 2025, 6:16 PM
Unknown Object (File)
Oct 3 2025, 10:54 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