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)
Thu, May 9, 8:56 AM
Unknown Object (File)
Tue, May 7, 10:56 PM
Unknown Object (File)
Tue, May 7, 10:54 PM
Unknown Object (File)
Tue, May 7, 10:54 PM
Unknown Object (File)
Tue, May 7, 10:54 PM
Unknown Object (File)
Tue, May 7, 7:11 PM
Unknown Object (File)
Apr 6 2024, 4:33 PM
Unknown Object (File)
Mar 31 2024, 7:40 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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