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)
Tue, Apr 30, 11:55 AM
Unknown Object (File)
Mon, Apr 8, 11:34 AM
Unknown Object (File)
Jan 16 2024, 8:50 AM
Unknown Object (File)
Jan 12 2024, 8:00 AM
Unknown Object (File)
Dec 26 2023, 9:33 PM
Unknown Object (File)
Dec 20 2023, 4:45 AM
Unknown Object (File)
Nov 6 2023, 12:47 PM
Unknown Object (File)
Sep 18 2023, 10:25 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable