Skip to main content

Crate fs_ext4

Crate fs_ext4 

Source
Expand description

ext4rs — pure-Rust ext4 filesystem driver.

Exposes a stable C ABI (fs_ext4_*) via capi so FFI consumers (Swift/C/Go/…) can link libfs_ext4.a and #include "fs_ext4.h".

Architecture (read-only Phase 1):

  • block_io — abstract trait for reading device blocks
  • superblock — parse + validate the on-disk superblock
  • features — feature flag inventory (COMPAT/INCOMPAT/RO_COMPAT)
  • bgd — block group descriptor parsing
  • inode — inode + extra fields parsing
  • extent — extent tree traversal (leaf/internal nodes, uninitialized extents)
  • dir — directory entries (linear and HTree)
  • hash — htree hash functions (legacy / half_md4 / tea)
  • fs — top-level filesystem handle, file/dir lookup, read API
  • capi — C ABI exports matching include/fs_ext4.h

Re-exports§

pub use error::Error;
pub use error::Result;
pub use fs::Filesystem;
pub use superblock::Superblock;

Modules§

acl
POSIX ACL decoder for ext4’s compact on-disk ACL format.
alloc
Block + inode bitmap allocator — planning layer.
bgd
Block group descriptor (BGD) parsing.
block_cache
Buffer cache wrapping a BlockDevice.
block_io
Abstract block-device I/O.
capi
C ABI exports — MUST match include/fs_ext4.h exactly. Consumers link libfs_ext4.a and #include that header; any signature change here requires the header to change in lockstep.
casefold
Case-folded directory lookup (E12, Phase 5).
checksum
Metadata checksum verification (RO_COMPAT_METADATA_CSUM).
dir
Linear directory entry parsing.
ea_inode
EA_INODE xattr value follow (E12, Phase 5).
error
Errors returned by the ext4rs driver.
extent
Extent tree traversal.
extent_mut
Extent tree mutation — planning layer (E7).
features
ext4 feature flags — COMPAT, INCOMPAT, RO_COMPAT.
file_io
Read file (or directory) contents using extent traversal.
file_mut
File-write high-level planner (E10).
fs
Top-level filesystem handle. Composes block_io + superblock + bgd + inode + extent + dir.
fs_core_bridge
Bidirectional bridge between ext4’s local BlockDevice trait and the shared fs_core::BlockDevice trait.
fsck
Read-only filesystem audit — a small subset of ext4 audit tool -n.
hash
HTree hash functions for indexed directory lookup.
htree
HTree (hash tree) directory lookup.
htree_mut
Htree rebalance — planning layer (E9).
indirect
Legacy direct + indirect block-pointer scheme used by ext2 and ext3 file inodes (and by ext4 inodes whose EXT4_EXTENTS_FL is unset).
indirect_mut
Mutation primitives for the legacy direct/indirect block-pointer scheme used by ext2 / ext3 (and ext4 inodes that opt out of extents).
inline_data
Inline data reading.
inode
ext4 inode parsing.
jbd2
JBD2 journal superblock parser.
journal
JBD2 transaction walker — read-only replay-plan producer.
journal_apply
JBD2 journal replay applier.
journal_writer
JBD2 live-write side: serialize a transaction, write it to the journal inode, then apply the writes to their final fs locations and mark the journal clean.
mkfs
ext4 filesystem creation (mkfs).
path
Path-to-inode resolution.
superblock
ext4 superblock parsing.
transaction
JBD2 transaction writer (E11).
verify
In-tree structural verifier for ext2 / ext3 / ext4 volumes.
xattr
Extended attribute (xattr) reading.