A simple, efficient FUSE driver for the FS5 filesystem. It provides read and basic write support by bridging kernel VFS calls to FS5.
- Read: directory listing via
FS5::list_at, file reads from local blob store; inline blobs served directly from metadata. - Write: atomic whole-file writes on close (create → sequential
write→releaseimports blob and updates FS5 metadata).mkdirsupported. - Registry-backed subdirs: listing and snapshot loading supported via FS5.
- Random writes (non-sequential offsets), append, truncate, preallocation.
rename,unlink,rmdir,symlink,link.chmod,chown,utimens, and other metadata changes.fsync,flush, open flags likeO_TRUNC/O_APPEND(ignored or rejected).- Proper uid/gid/perms; all attrs are placeholders and not persisted.
- Fine-grained cache invalidation and TTLs; in-memory inode/attr cache is minimal.
- Large directory pagination (readdir uses a fixed limit and ignores cursors).
- Concurrency around the same path: last-writer-wins; no file-level locks.
- Registry-backed writes require a signing key to publish; otherwise subdir state is only visible via the running actor (not published to the registry on disk).
- Writes
- Support
O_TRUNC, append, and random writes via a temp-file writeback layer. - Implement
fsync/flushto persist early.
- Support
- Directory ops
- Add
rename,unlink,rmdirusing FS5 batch mutations. - Use real pagination for
readdirby threading FS5 cursors between FUSE offsets.
- Add
- Caching
- Add LRU for Dir snapshots and attrs; invalidate parent on write.
- Optional TTLs and a background refresher for registry-backed dirs.
- FS5 API (nice-to-have)
FS5::read_bytes(path, offset, len)to centralize read IO.FS5::stat_at(path)to fetch size/timestamps without loading snapshots.FS5::list_atis in place; expose a cursor→offset mapping helper.
- Permissions & IDs
- Map uid/gid from the running process or a config; optionally read-only mounts.
- Performance
- Readahead on large reads; simple read cache by blob range.
- Batch
file_put_synccalls during heavy writes beforesave.
- Robustness
- Better error mapping; distinguish IO vs NotFound vs PermissionDenied.
- Graceful handling of partial writes and ENOSPC conditions.
- Mount UX (rclone-inspired)
- Add
--daemon/--daemon-waitflags for background mounting with a simple Linux-only re-exec model. - Support
--volnameand thread it intoMountOption::FSNameso tools show a meaningful volume label. - Expose
--uid,--gid,--file-perms,--dir-perms, and--umaskflags to control FUSE attrs for multi-user setups and systemd mounts. - Add
--dir-cache-time/--attr-timeoutflags to tune FS5/FUSE directory and attribute cache behavior. - Provide a signal (e.g.
SIGUSR1) and/ors5 fuse flushhelper to drop FUSE caches and re-snapshot FS5. - Support
--snapshot <NAME|HASH>to mount a specific FS5 snapshot as strictly read-only. - Document example systemd units (
s5-fuse@.service,.mount/.automount) for runnings5 fuseas a service.
- Add
This driver is normally used indirectly via the s5 CLI:
s5 mount /mnt/s5-docs --root /path/to/fs5-root --allow-root --auto-unmount--rootpoints to a directory containingroot.fs5.cborand blob data.- Mount runs async by default for better throughput.
- Atomic, whole-file writes: size and metadata update on close (
release). - Registry-backed dirs are listed via FS5 and can be read; publishing changes to the registry requires a signing key configured in FS5 context.
- This driver aims for simplicity over completeness; please file issues for missing ops you need.