summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-04-05 22:09:24 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-06-20 17:16:33 -0400
commit45f6fe0a144a82542a37f34e826e16dedfdaca5d (patch)
treea91f6c521afbb2fb2bc17aa10a1d73e4960b80fe /src
parentf2d9a55b1b83bce71416b3dca7cf013154c04251 (diff)
cmd_image_create
Add a tool for creating small image files. Data is written out in a reproducible order, sequentially from the start of the device. Metadata is initially written to a temporary device, then after writing out data, the metadata we want to keep (alloc info is left out by default) is migrated to the real device. Then, the image file is trimmed to minimum size and the temporary metadata device dropped. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'src')
-rw-r--r--src/bcachefs.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bcachefs.rs b/src/bcachefs.rs
index d318c8af..9774ddca 100644
--- a/src/bcachefs.rs
+++ b/src/bcachefs.rs
@@ -49,6 +49,7 @@ fn handle_c_command(mut argv: Vec<String>, symlink_cmd: Option<&str>) -> i32 {
"format" => c::cmd_format(argc, argv),
"fs" => c::fs_cmds(argc, argv),
"fsck" => c::cmd_fsck(argc, argv),
+ "image" => c::image_cmds(argc, argv),
"list_journal" => c::cmd_list_journal(argc, argv),
"kill_btree_node" => c::cmd_kill_btree_node(argc, argv),
"migrate" => c::cmd_migrate(argc, argv),