HomeFreeBSD

fusefs: in the tests, always assume debug.try_reclaim_vnode is available

Description

fusefs: in the tests, always assume debug.try_reclaim_vnode is available

In an earlier version of the revision that created that sysctl (D20519)
the sysctl was gated by INVARIANTS, so the test had to check for it.
But in the committed version it is always available.

(cherry picked from commit 19ab361045343bb777176bb08468f7706d7649c4)

fusefs: move common code from forget.cc to utils.cc

(cherry picked from commit 8d99a6b91b788b7ddf88f975f288f7c6479f4be3)

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

(cherry picked from commit 1613087a8127122b03a3730046d051adf4edd14f)

Details

Provenance
asomersAuthored on Dec 2 2021, 2:38 AM
Reviewer
pfg
Differential Revision
D33239: fusefs: fix .. lookups when the parent has been reclaimed.
Parents
rGc85846ea3ea5: Fix a race in fusefs that can corrupt a file's size.
Branches
Unknown
Tags
Unknown