Commit graph

5 commits

Author SHA1 Message Date
Keiichi Watanabe
14907b14a6 ext2: Set up root dir and lost+found
Now, it can create a valid ext2 disk.

BUG=b:329359333
TEST=cargo test

Change-Id: I7ccf32810ec06291aea971e22ad839f9c9011036
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5400931
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
2024-06-10 02:26:46 +00:00
Keiichi Watanabe
7f122044de ext2: Support group descriptor and bit maps
BUG=b:329359333
TEST=cargo test

Change-Id: I4a3b6db64c582f400fce2473d068117a1a616802
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5404440
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
2024-05-22 09:16:15 +00:00
Keiichi Watanabe
53a6086399 ext2: Avoid memory copy by using arena allocator
In the current implementation, the data structure of superblock is
allocated on heap first and written into MemoryMapping area at the
end.
Instead, this CL implements an arena allocator over MemoryMapping
so we can prepare MemoryMapping first and allocate superblock and
other data structures on the area.

BUG=b:331531953
TEST=cargo test

Change-Id: Ie292d448f1c7bce7a23c8194b9e30e5f278ba2c6
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5490599
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
2024-05-22 08:31:13 +00:00
Keiichi Watanabe
0ebf8a6000 ext2: Support customized parameters
Allow changing {blocks,inodes}_per_group.

BUG=b:329359333
TEST=cargo test

Change-Id: I1646f80dbe92dbdafbe4147a8abbd141784aff69
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5400932
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
2024-05-07 10:46:31 +00:00
Keiichi Watanabe
ae8886cbb7 ext2: Add initial implementation of ext2 crate
Add a logic to create a valid superblock.
This crate is supposed to be used for implementing virito-pmem-ext2,
which is a virtio-pmem where ext2 file system is constructed at
boot time. See go/virtio-pmem-ext2 for the details.

BUG=b:329359333
TEST=cargo test

Change-Id: Ib86c0c8e9562e885266d3b321f9f2e302581b90a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5404370
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2024-04-17 03:04:17 +00:00