Linux-EROFS Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/2] erofs-utils: add dm-persistent file delta support
@ 2026-09-16  9:10 Yifan Zhao
  2026-09-16  9:10 ` [PATCH RFC 1/2] erofs-utils: mkfs: add file-delta framework Yifan Zhao
  2026-09-16  9:10 ` [PATCH RFC 2/2] erofs-utils: mkfs: support dm-persistent file deltas Yifan Zhao
  0 siblings, 2 replies; 3+ messages in thread
From: Yifan Zhao @ 2026-09-16  9:10 UTC (permalink / raw)
  To: linux-erofs

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.erofs

The 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
-- 
2.55.0



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-16  9:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-16  9:10 [PATCH RFC 0/2] erofs-utils: add dm-persistent file delta support Yifan Zhao
2026-09-16  9:10 ` [PATCH RFC 1/2] erofs-utils: mkfs: add file-delta framework Yifan Zhao
2026-09-16  9:10 ` [PATCH RFC 2/2] erofs-utils: mkfs: support dm-persistent file deltas Yifan Zhao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox