Commit 1e6c221
committed
fix(deps): Adapt code to fuser 0.17 breaking changes
fuser 0.17 requires Filesystem: Send + Sync + 'static, which means
the composefs core types need to be thread-safe. This commit:
- Changes Rc<Leaf<T>> to Arc<Leaf<T>> and Box<Directory<T>> to
Arc<Directory<T>> in the generic_tree Inode enum, making tree nodes
shareable across threads.
- Changes RefCell<BTreeMap<...>> to RwLock<BTreeMap<...>> in Stat.xattrs,
replacing .borrow()/.borrow_mut() with .read().unwrap()/.write().unwrap().
- Rewrites composefs-fuse to adapt to fuser 0.17's API changes:
- &mut self -> &self on all Filesystem trait methods (mutable state
moved behind a Mutex)
- u64 -> INodeNo/FileHandle/LockOwner newtype wrappers
- i32 -> OpenFlags, reply errors use fuser::Errno constants
- Session::run() replaced with Session::spawn()?.join()
- Session::from_fd() takes a Config parameter
- serve_tree_fuse() now takes Arc<Directory> and Arc<Repository>
by value to satisfy the 'static bound
- #![forbid(unsafe_code)] is preserved throughout
Assisted-by: OpenCode (claude-opus-4-6)1 parent a154cfc commit 1e6c221
15 files changed
Lines changed: 653 additions & 315 deletions
File tree
- crates
- composefs-boot/src
- composefs-fuse/src
- composefs-oci/src
- composefs
- fuzz
- src
- erofs
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
| 214 | + | |
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
| 271 | + | |
| 272 | + | |
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
| |||
0 commit comments