New tool: 'bcachefs image update', for updating images produced by
'bcachefs image create': this tool will update images while making the
minimal changes to the on disk image, to make tools like casync more
efficient.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
We need the key cache to be flushed before moving btree nodes - key
cache flushing won't obey the target we're moving btree nodes to.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
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>