Page MenuHomeFreeBSD

vfs: fully hold vnodes in vnlru_free_locked
ClosedPublic

Authored by mjg on Sep 4 2019, 6:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Aug 15, 2:50 PM
Unknown Object (File)
Jun 27 2025, 4:27 PM
Unknown Object (File)
Jun 27 2025, 2:57 PM
Unknown Object (File)
Jun 21 2025, 6:08 PM
Unknown Object (File)
Jun 15 2025, 3:42 PM
Unknown Object (File)
May 17 2025, 12:36 AM
Unknown Object (File)
Feb 8 2025, 10:57 PM
Unknown Object (File)
Feb 8 2025, 10:40 PM
Subscribers

Details

Summary

Currently the code only bumps holdcnt and clears the VI_FREE flag, not performing actual vhold. Since the vnode is still visible elsewhere, a potential new user can find it and incorrectly assume it is properly held. Use vholdl to properly hold the vnode.

The other place recycling (vlrureclaim) does this already. This probably can be hacked to avoid most of the work, but that's for later.

Test Plan

reduced maxvnodes to 20000 and tested with suj11.sh from stress2. constant recycles with no issues.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

This revision is now accepted and ready to land.Sep 4 2019, 6:43 PM
This revision was automatically updated to reflect the committed changes.