HomeFreeBSD

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

Description

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

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
Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D33239

Details

Provenance
asomersAuthored on Dec 2 2021, 2:50 AM
Reviewer
pfg
Differential Revision
D33239: fusefs: fix .. lookups when the parent has been reclaimed.
Parents
rG8d99a6b91b78: fusefs: move common code from forget.cc to utils.cc
Branches
Unknown
Tags
Unknown