Page MenuHomeFreeBSD

fusefs: fix .. lookups when the parent has been reclaimed.
ClosedPublic

Authored by asomers on Dec 3 2021, 3:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Feb 26, 11:54 PM
Unknown Object (File)
Tue, Feb 25, 11:04 PM
Unknown Object (File)
Sat, Feb 22, 2:37 PM
Unknown Object (File)
Sat, Feb 22, 1:37 PM
Unknown Object (File)
Fri, Feb 7, 10:03 PM
Unknown Object (File)
Jan 31 2025, 7:31 AM
Unknown Object (File)
Dec 17 2024, 10:55 PM
Unknown Object (File)
Dec 14 2024, 1:43 PM
Subscribers

Details

Summary

By default, FUSE file systems are assumed not to support lookups for "."
and "..". They must opt-in to that. To cope with this limitation, the
fusefs kernel module caches every fuse vnode's parent's inode number,
and uses that during VOP_LOOKUP for "..". But if the parent's vnode has
been reclaimed that won't be possible. Previously we paniced in this
situation. Now, we'll return ESTALE instead. Or, if the file system
has opted into ".." lookups, we'll just do that instead.

This commit also fixes VOP_LOOKUP to respect the cache timeout for ".."
lookups, if the FUSE file system specified a finite timeout.

PR: 259974
MFC after: 2 weeks

Test Plan

Tests added

Diff Detail

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