crosvm/ext2
Keiichi Watanabe a00e6ab356 ext2: Use constant for block size (4096 bytes)
The only supported block size in the ext2 crate is 4K. So, use a
constant value rather than having a function `block_size()`.
Also, we expose this block size constant so the user of this
crate will be able to write a code that relies on the block size.

BUG=b:329359333
TEST=CQ

Change-Id: I81dd03f7428171e07f92efee794bb2b9ea5a4c3a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5691815
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
2024-07-11 10:44:17 +00:00
..
examples ext2: Support multiple block groups 2024-07-03 02:02:26 +00:00
src ext2: Use constant for block size (4096 bytes) 2024-07-11 10:44:17 +00:00
tests ext2: Fix permission of the root directory 2024-07-10 13:46:48 +00:00
Cargo.toml ext2: Allow constructing a file system from a directory 2024-06-17 11:57:48 +00:00
README.md ext2: Add example mkfs program 2024-04-17 06:16:54 +00:00

ext2

This crate provides utilities to create ext2 file system on memory or a file.

examples/mkfs.rs shows how to use this library. This program is our alternative to mkfs.ext2 that create an ext2 file system on a file and useful for debugging this ext2 itself with existing utilities in e2fsprogs such as fsck and dumpe2fs.

$ cargo run --release --example mkfs -- --path disk.img
Create disk.img
$ dumpe2fs disk.img
dumpe2fs 1.47.0 (5-Feb-2023)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          c6e49d8f-106f-4472-b0e8-6babcc3fa496
Filesystem magic number:  0xEF53
...