From: Lucas Karpinski <lkarpinski@nvidia.com>
To: linux-erofs@lists.ozlabs.org
Cc: jcalmels@nvidia.com, Lucas Karpinski <lkarpinski@nvidia.com>
Subject: [PATCH v2 1/5] erofs-utils: lib: pass uniaddr_offset to erofs_rebuild_load_tree
Date: Mon, 9 Mar 2026 12:38:17 -0400 [thread overview]
Message-ID: <20260309-merge-fs-v2-1-2dd0ef53db4d@nvidia.com> (raw)
In-Reply-To: <20260309-merge-fs-v2-0-2dd0ef53db4d@nvidia.com>
uniaddr_offset will be needed for rebuild fulldata mode. Add a parameter
to erofs_rebuild_load_tree and include it in the erofs_rebuild_dir_context
struct as well.
Signed-off-by: Lucas Karpinski <lkarpinski@nvidia.com>
---
lib/liberofs_rebuild.h | 3 ++-
lib/rebuild.c | 5 ++++-
mkfs/main.c | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/lib/liberofs_rebuild.h b/lib/liberofs_rebuild.h
index 69802fb..d8c4c8a 100644
--- a/lib/liberofs_rebuild.h
+++ b/lib/liberofs_rebuild.h
@@ -14,7 +14,8 @@ struct erofs_dentry *erofs_rebuild_get_dentry(struct erofs_inode *pwd,
char *path, bool aufs, bool *whout, bool *opq, bool to_head);
int erofs_rebuild_load_tree(struct erofs_inode *root, struct erofs_sb_info *sbi,
- enum erofs_rebuild_datamode mode);
+ enum erofs_rebuild_datamode mode,
+ erofs_blk_t uniaddr_offset);
int erofs_rebuild_load_basedir(struct erofs_inode *dir, u64 *nr_subdirs,
unsigned int *i_nlink);
diff --git a/lib/rebuild.c b/lib/rebuild.c
index f89a17c..7e62bc9 100644
--- a/lib/rebuild.c
+++ b/lib/rebuild.c
@@ -286,6 +286,7 @@ struct erofs_rebuild_dir_context {
unsigned int *i_nlink;
};
};
+ erofs_blk_t uniaddr_offset; /* unified addressing offset for FULL mode */
};
static int erofs_rebuild_dirent_iter(struct erofs_dir_context *ctx)
@@ -419,7 +420,8 @@ out:
}
int erofs_rebuild_load_tree(struct erofs_inode *root, struct erofs_sb_info *sbi,
- enum erofs_rebuild_datamode mode)
+ enum erofs_rebuild_datamode mode,
+ erofs_blk_t uniaddr_offset)
{
struct erofs_inode inode = {};
struct erofs_rebuild_dir_context ctx;
@@ -452,6 +454,7 @@ int erofs_rebuild_load_tree(struct erofs_inode *root, struct erofs_sb_info *sbi,
.ctx.cb = erofs_rebuild_dirent_iter,
.mergedir = root,
.datamode = mode,
+ .uniaddr_offset = uniaddr_offset,
};
ret = erofs_iterate_dir(&ctx.ctx, false);
free(inode.i_srcpath);
diff --git a/mkfs/main.c b/mkfs/main.c
index 58c18f9..c2c0a1d 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -1736,7 +1736,7 @@ static int erofs_mkfs_rebuild_load_trees(struct erofs_inode *root)
list_for_each_entry(src, &rebuild_src_list, list) {
src->xamgr = g_sbi.xamgr;
- ret = erofs_rebuild_load_tree(root, src, datamode);
+ ret = erofs_rebuild_load_tree(root, src, datamode, 0);
src->xamgr = NULL;
if (ret) {
erofs_err("failed to load %s", src->devname);
--
Git-155)
next prev parent reply other threads:[~2026-03-09 16:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 16:38 [PATCH v2 0/5] erofs-utils: implement the FULLDATA rebuild mode Lucas Karpinski
2026-03-09 16:38 ` Lucas Karpinski [this message]
2026-03-09 16:38 ` [PATCH v2 2/5] erofs-utils: lib: add helper function erofs_uuid_unparse_as_tag Lucas Karpinski
2026-03-09 16:38 ` [PATCH v2 3/5] erofs-utils: lib: preserve primarydevice_blocks if already larger Lucas Karpinski
2026-03-09 16:38 ` [PATCH v2 4/5] erofs-utils: mfks: add rebuild FULLDATA for combined EROFS images Lucas Karpinski
2026-03-10 10:24 ` Gao Xiang
2026-03-09 16:38 ` [PATCH v2 5/5] erofs-utils: manpages: update to reflect fulldata support Lucas Karpinski
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=20260309-merge-fs-v2-1-2dd0ef53db4d@nvidia.com \
--to=lkarpinski@nvidia.com \
--cc=jcalmels@nvidia.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