Skip to content

fix(lookup): resolve lower tiers outside caller namespace - #184

Merged
JBailes merged 1 commit into
mainfrom
fix/lower-resolution-mount-namespace
Jul 21, 2026
Merged

fix(lookup): resolve lower tiers outside caller namespace#184
JBailes merged 1 commit into
mainfrom
fix/lower-resolution-mount-namespace

Conversation

@JBailes

@JBailes JBailes commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • resolve pool-relative lower-tier paths from SmoothFS's pinned struct path
  • avoid d_path() + kern_path(), which incorrectly re-enters the calling task's mount namespace
  • centralize the resolver shared by lookup, directory, and superblock paths
  • add a regression harness that hides backing-tier mountpoints in a container-like mount namespace

Root cause

Plex runs inside an LXC container that sees the merged SmoothFS bind mount but intentionally does not see SmoothNAS's host-only backing-tier mountpoints. The existing resolver rendered a pinned lower path into a pathname and passed it to kern_path(). That lookup starts in the caller's mount namespace, so files present only on a lower tier returned ENOENT until a host lookup warmed the union dentry.

The fix uses vfs_path_lookup() relative to the already-pinned lower dentry and mount.

Validation

  • git diff --check
  • patched module builds on SmoothNAS against kernel 7.0.11-smoothkernel
  • new tier_spill_mount_namespace_lookup.sh regression test fails against released SmoothFS v0.2.23 before this fix

@JBailes
JBailes merged commit 9be4f02 into main Jul 21, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant