RFC erofs-utils: add dm-persistent file delta support
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | erofs-utils: mkfs: add file-delta frameworkinclude/ lib/ lib/ +7 more | +725 | 0 replies | |
| 2/2 | erofs-utils: mkfs: support dm-persistent file deltaslib/ lib/ lib/ +2 more | +424 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH RFC 0/2] erofs-utils: add dm-persistent file delta support
This series adds a file-delta framework and a dm-persistent backend to mkfs.erofs. Unchanged data is referenced from the parent image; changed nonzero data is stored in the new image.
Example: rootfs/disk.img is the baseline file, and epoch1.cow is a sealed dm-persistent v1 snapshot exception store for that file, using 4096-byte (8-sector) chunks.
# Create the parent image containing /disk.img.
mkfs.erofs -Eforce-chunk-indexes --chunksize=4096 \
parent.erofs rootfs/
# Apply epoch1.cow to /disk.img and write next.erofs.
mkfs.erofs -Eforce-chunk-indexes --chunksize=4096 \
--file-delta=dm-persistent:/disk.img:epoch1.cow \
next.erofs parent.erofs
# Check the new image using the parent as its external data device.
fsck.erofs --device=parent.erofs next.erofsThe update --chunksize must match the exception store's chunk size.
Yifan Zhao (2):
erofs-utils: mkfs: add file-delta framework
erofs-utils: mkfs: support dm-persistent file deltas
include/erofs/internal.h | 2 + lib/Makefile.am | 5 +- lib/blobchunk.c | 25 +++ lib/dm_persistent.c | 396 +++++++++++++++++++++++++++++++++++ lib/file_delta.c | 214 +++++++++++++++++++ lib/file_delta_chunk.c | 203 ++++++++++++++++++ lib/liberofs_chunk.h | 2 + lib/liberofs_dm_persistent.h | 9 + lib/liberofs_file_delta.h | 81 +++++++ lib/rebuild.c | 34 ++- man/mkfs.erofs.1 | 71 +++++++ mkfs/main.c | 113 +++++++++- 12 files changed, 1148 insertions(+), 7 deletions(-) create mode 100644 lib/dm_persistent.c create mode 100644 lib/file_delta.c create mode 100644 lib/file_delta_chunk.c create mode 100644 lib/liberofs_dm_persistent.h create mode 100644 lib/liberofs_file_delta.h
base-commit: 2429baa75a5278ddaf8221740a6a65dd390acb08
Signature · 1 line
2.55.0