Crate ext2

Source
Expand description

This crate provides a logic for creating an ext2 filesystem on memory.

ModulesΒ§

arena πŸ”’
Defines an arena allocator backed by base::MemoryMapping.
bitmap πŸ”’
Defines bitmap types.
blockgroup πŸ”’
Defines structs for metadata of block groups.
builder πŸ”’
Provides structs and logic to build ext2 file system with configurations.
fs πŸ”’
Defines a struct to represent an ext2 filesystem and implements methods to create
inode πŸ”’
Defines the inode structure.
superblock πŸ”’
Defines the superblock structure.
xattr πŸ”’
Provides utilites for extended attributes.

StructsΒ§

Builder
A struct to represent the configuration of an ext2 filesystem.

ConstantsΒ§

BLOCK_SIZE
The size of a block in bytes. We only support 4K-byte blocks.

FunctionsΒ§

dump_xattrs
Retrieves the list of pairs of a name and a value of the extended attribute of the given path. If path is a symbolic link, it won’t be followed and the value of the symlink itself is returned. The return values are byte arrays WITHOUT trailing NULL byte.
set_xattr
Sets the extended attribute of the given path with the given key and value.