How erofs/erofs-utils works
erofs-utils provides tools to create, mount, analyze, and check EROFS filesystem images. The main workflow is to format source files into an image, then expose that image through a kernel mount or FUSE; dump and fsck provide inspection, verification, and extraction paths. Shared filesystem-reading and format logic is represented as an internal layer. The README documents the tools, while sampled excerpts are partial, so uncertain internal calls and optional backend wiring are omitted.
Main entry points: mount/main.c mount.erofs · fuse/main.c FUSE daemon · fsck/main.c Checker and extractor · mkfs/main.c mkfs.erofs
Components 21
Image creation
- mkfs.erofs
mkfs/main.c
Image access
- mount.erofs
mount/main.c - FUSE daemon
fuse/main.c
Inspection and recovery
- Image analyzer
dump/main.c - Checker and extractor
fsck/main.c
Filesystem core
- File importer
lib/importer.c - Compression
lib/compress.c - Packed fragments
lib/fragments.c - Image I/O
lib/io.c - Inode access
lib/inode.c - Directory access
lib/dir.c - Decompression
lib/decompress.c - Extended attributes
lib/xattr.c
Remote backends
- OCI remote images
lib/remotes/oci.c - S3 storage
lib/remotes/s3.c - NBD backend
lib/backends/nbd.c - ublk backend
lib/backends/ublk.c
Other components
- Source files
- EROFS image
- Kernel mount
- FUSE client
Connections 26
- Source files → mkfs.erofs: formats
- mkfs.erofs → File importer: imports files
- mkfs.erofs → Compression: configures compression
- File importer → Packed fragments: packs fragments
- mkfs.erofs → EROFS image: writes image
- EROFS image → mount.erofs: mounts
- mount.erofs → Kernel mount: requests mount
- EROFS image → FUSE daemon: serves image
- FUSE client → FUSE daemon: requests files
- FUSE daemon → Image I/O: reads image
- FUSE daemon → Inode access: looks up inodes
- FUSE daemon → Directory access: reads directories
- FUSE daemon → Extended attributes: serves attributes
- EROFS image → Image analyzer: analyzes
- Image analyzer → Image I/O: reads image
- Image analyzer → Inode access: reads metadata
- EROFS image → Checker and extractor: checks or extracts
- Checker and extractor → Image I/O: reads image
- Checker and extractor → Inode access: checks inodes
- Checker and extractor → Decompression: verifies data
- Checker and extractor → Extended attributes: checks attributes
- mount.erofs → OCI remote images: uses OCI source
- mount.erofs → NBD backend: serves NBD
- mount.erofs → S3 storage: uses S3 source
- mount.erofs → ublk backend: uses ublk backend
- OCI remote images → S3 storage