Haiku 9P
Press Esc to go back
/projects/haiku-9p
A 9P2000.L filesystem client implementation for Haiku OS. Enables mounting Plan 9/QEMU shared folders directly in Haiku, bridging the gap between Haiku and host systems during development.
What is 9P?
9P is a network protocol for distributed file systems originally developed for Plan 9 from Bell Labs. The 9P2000.L variant extends it with Linux-specific features for better POSIX compatibility. QEMU uses 9P for virtfs host folder sharing.
# Start QEMU with shared folder
qemu-system-x86_64 \
-virtfs local,path=/shared,mount_tag=host,security_model=mapped-xattr
# Mount in Haiku
mount -t 9p -o tag=host /mnt/host
Protocol Implementation
Core Operations
- Tversion/Rversion - Protocol negotiation
- Tattach/Rattach - Filesystem attach
- Twalk/Rwalk - Path traversal
- Tlopen/Rlopen - File open
- Tread/Rread - Read data
- Twrite/Rwrite - Write data
- Tclunk/Rclunk - Release handle
9P2000.L Extensions
- Tgetattr/Rgetattr - POSIX stat
- Tsetattr/Rsetattr - chmod/chown
- Treaddir/Rreaddir - Directory listing
- Tmkdir/Rmkdir - Create directory
- Tunlinkat/Runlinkat - Delete file
- Tsymlink/Rsymlink - Create symlink
- Tstatfs/Rstatfs - Filesystem stats
Progress Tracker
Done
- Protocol message encoding
- Message decoding/parsing
- Basic client library
- Test infrastructure
In Progress
- Kernel module integration
- VFS layer binding
- Virtio transport
Planned
- Mount command support
- Caching layer
- Performance tuning
Use Cases
- Development: Share code between host and Haiku VM without network setup
- Testing: Easily transfer test files and results
- Building: Access build tools and outputs across systems
- Integration: Enable CI/CD pipelines with shared artifacts