How jaylogue/retro-fuse works
Main Components
a. User Space Layer:
• Modern OS Applications
• FUSE Interface
• retro-fuse Main Handlers (v6fs, v7fs, bsd29fs, bsd211fs)
b. Adaptation Layer:
• Adaptation Components (v6adapt, v7adapt, bsd29adapt, bsd211adapt)
• Un-adaptation Components (v6unadapt, v7unadapt, etc.)
c. Historic Unix Kernel Code:
• File System Operations
• I/O Subsystem
• Device Drivers
d. Disk I/O Layer:
• Modern Disk I/O Interface (dskio.c)
Component Relationships
• User requests flowing from modern applications through FUSE
• Request translation through the adaptation layer
• Interaction with historic Unix code
• Physical storage access through the disk I/O layer
Specific Implementation Details
Key architectural elements:
• Common FUSE interface (fusecommon.c)
• ID mapping system (idmap.c)
• Filesystem-specific handlers for each Unix version
• Original Unix kernel code integration points
┌─────────────────────────┐
• Modern Applications │
• ┬──────────┘
• ▼
┌─────────────────────────┐
• FUSE Interface │
• ┬──────────┘
• ▼
┌─────────────────────────┐
• retro-fuse Handlers │
• (v6fs, v7fs, bsd*fs) │
• ┬──────────┘
• ▼
┌─────────────────────────┐
• Adaptation Layer │
• (*adapt/*unadapt) │
• ┬──────────┘
• ▼
┌─────────────────────────┐
• Historic Unix Code │
• (filesystem operations) │
• ┬──────────┘
• ▼
┌─────────────────────────┐
• Disk I/O Layer │
• ┬──────────┘
• ▼
┌─────────────────────────┐
• Physical Storage │
• ┘
Additional Elements
Annotations for:
• Supported filesystem types (V6, V7, BSD 2.9, BSD 2.11)
• Key API entry points
• Data transformation points
• Error handling paths
Implementation Notes
• Clean separation between modern and historic code
• Adaptation layer's role in code modernization
• FUSE integration points
• Multiple filesystem support architecture
This design captures the unique aspect of retro-fuse: its use of original Unix kernel code adapted to run in user space while maintaining historical fidelity of on-disk structures.