Skip to content

Commit 5c311d1

Browse files
committed
partitioning: Add a new planner system
This new planner is undo-stack based designed with eventual UIs in mind, and quite simple right now. Basically we track partitions/regions and assert alignment boundaries, and test a bunch of common scenarios using the new MockDisk APIs. It will need some iteration as we go to account for usable LBA ranges within the GPT headers, so we'll need to wrap the Planner up into a Strategy system in a subsequent commit. Effectively we'll have the table in memory either as a copy or a fresh one for a disk wipe. Signed-off-by: Ikey Doherty <[email protected]>
1 parent 7947ebd commit 5c311d1

File tree

4 files changed

+532
-0
lines changed

4 files changed

+532
-0
lines changed

Cargo.lock

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/partitioning/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ log.workspace = true
1111
gpt.workspace = true
1212
nix.workspace = true
1313
linux-raw-sys = { workspace = true, features = ["loop_device", "ioctl"] }
14+
15+
[dev-dependencies]
16+
test-log.workspace = true

crates/partitioning/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ pub mod loopback;
77
pub mod sparsefile;
88

99
pub use gpt;
10+
11+
pub mod planner;

0 commit comments

Comments
 (0)