Linux-EROFS Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yifan Zhao <stopire@gmail.com>
To: linux-erofs@lists.ozlabs.org
Subject: [PATCH RFC 0/2] erofs-utils: add dm-persistent file delta support
Date: Wed, 16 Sep 2026 17:10:01 +0800	[thread overview]
Message-ID: <cover.1789545930.git.stopire@gmail.com> (raw)

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



             reply	other threads:[~2026-09-16  9:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16  9:10 Yifan Zhao [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1789545930.git.stopire@gmail.com \
    --to=stopire@gmail.com \
    --cc=linux-erofs@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox