HomeFreeBSD

vtruncbuf: improve the check for meta buffer

Description

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.

Reviewed by: chs, markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D43261

Details

Provenance
kibAuthored on Dec 31 2023, 8:46 PM
Reviewer
chs
Differential Revision
D43261: Minor improvements for vtruncbuf()
Parents
rG4c41d10f1538: vtruncbuf: add a comment explaining the purpose of the loop
Branches
Unknown
Tags
Unknown