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
F175412668: D34753.id104511.diff
Sat, Oct 10, 4:40 PM
F175412571: D34753.id104521.diff
Sat, Oct 10, 4:39 PM
F175412302: D34753.diff
Sat, Oct 10, 4:35 PM
Unknown Object (File)
Thu, Oct 8, 4:46 AM
Unknown Object (File)
Wed, Oct 7, 9:31 AM
Unknown Object (File)
Tue, Oct 6, 5:53 AM
Unknown Object (File)
Mon, Oct 5, 5:39 PM
Unknown Object (File)
Mon, Oct 5, 12:25 PM
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 44972
Build 41860: 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