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
F133095198: D21522.id61652.diff
Wed, Oct 22, 10:36 PM
Unknown Object (File)
Sat, Oct 18, 12:30 AM
Unknown Object (File)
Sat, Oct 18, 12:30 AM
Unknown Object (File)
Sat, Oct 18, 12:30 AM
Unknown Object (File)
Fri, Oct 17, 2:43 PM
Unknown Object (File)
Wed, Oct 1, 1:26 AM
Unknown Object (File)
Mon, Sep 29, 6:38 AM
Unknown Object (File)
Sun, Sep 28, 6:10 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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.