Skip to content

generic_tree: Replace Rc/RefCell with flat index-based FileSystem#284

Merged
Johan-Liebert1 merged 3 commits intocomposefs:mainfrom
cgwalters:flat-filesystem
Apr 8, 2026
Merged

generic_tree: Replace Rc/RefCell with flat index-based FileSystem#284
Johan-Liebert1 merged 3 commits intocomposefs:mainfrom
cgwalters:flat-filesystem

Conversation

@cgwalters
Copy link
Copy Markdown
Collaborator

In trying to update to the newer fuse crate, it wants to do multithreaded stuff, and that just breaks with the Rc inside FileSystem.

Similarly - I recently changed our local filesystem scanning to be async, and the Rc usage made it less ergonomic.

There are 3 cases we care about:

  • Borrowed, immutable in memory tree (no interior mut needed!)
  • Owned &mut version
  • Merging/flattening two trees

I think it's just more natural for us to represent the filesystem with a set of inodes, plus the recursive tree pointing to those.

Assisted-by: OpenCode (Claude Opus 4)

@cgwalters cgwalters mentioned this pull request Apr 7, 2026
1 task
In trying to update to the newer fuse crate, it wants to do
multithreaded stuff, and that just breaks with the `Rc` inside
`FileSystem`.

Similarly - I recently changed our local filesystem
scanning to be async, and the `Rc` usage made it less
ergonomic.

There are 3 cases we care about:

- Borrowed, immutable in memory tree (no interior mut needed!)
- Owned &mut version
- Merging/flattening two trees

I think it's just more natural for us to represent
the filesystem with a set of inodes, plus the recursive
tree pointing to those.

Assisted-by: OpenCode (Claude Opus 4)
Signed-off-by: Colin Walters <walters@verbum.org>
…tput

The fuzzer found a crash where a malformed EROFS image had duplicate
directory entry names. When two entries share a name, BTreeMap::insert
silently replaces the first, leaving its leaf orphaned (unreferenced).
This tripped a debug_assert in erofs_to_filesystem.

Ensure we catch this problem cleanly in our EROFS parser.

Assisted-by: OpenCode (Claude Opus 4)
Signed-off-by: Colin Walters <walters@verbum.org>
We need c++ for libfuzzer-sys@0.4.12

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
@Johan-Liebert1 Johan-Liebert1 enabled auto-merge April 8, 2026 03:59
@Johan-Liebert1 Johan-Liebert1 added this pull request to the merge queue Apr 8, 2026
Merged via the queue into composefs:main with commit a10e422 Apr 8, 2026
20 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.

2 participants