Page MenuHomeFreeBSD

fusefs: fix two bugs regarding VOP_RECLAIM of the root inode
ClosedPublic

Authored by asomers on Apr 2 2022, 7:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 23, 6:14 AM
Unknown Object (File)
Tue, Dec 10, 1:33 AM
Unknown Object (File)
Dec 1 2024, 2:01 PM
Unknown Object (File)
Nov 27 2024, 11:48 AM
Unknown Object (File)
Nov 26 2024, 9:11 PM
Unknown Object (File)
Nov 24 2024, 5:19 PM
Unknown Object (File)
Nov 22 2024, 11:48 PM
Unknown Object (File)
Nov 22 2024, 10:37 AM
Subscribers

Details

Summary
  • We never send FUSE_LOOKUP for the root inode, since its inode number is hard-coded to 1. Therefore, we should not send FUSE_FORGET for it, lest the server see its lookup count fall below 0.
  • During VOP_RECLAIM, if we are reclaiming the root inode, we must clear the file system's vroot pointer. Otherwise it will be left pointing at a reclaimed vnode, which will cause future VOP_LOOKUP operations to fail. Previously we only cleared that pointer during VFS_UMOUNT. I don't know of any real-world way to trigger this bug.

MFC after: 2 weeks

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 44967
Build 41855: arc lint + arc unit

Event Timeline

Release root inode even if the server is already detached

This revision is now accepted and ready to land.Apr 4 2022, 3:29 AM