Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/overlaybd/tar/erofs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include(FetchContent)
FetchContent_Declare(
erofs-utils
GIT_REPOSITORY git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git
GIT_TAG 617d708925b3c5d1dd132853e47d9d9f51443e6f
GIT_TAG ac0997ea32a465a6b0db7b782bb8d4d07952365a
)

FetchContent_MakeAvailable(erofs-utils)
Expand Down
5 changes: 5 additions & 0 deletions src/overlaybd/tar/erofs/liberofs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define round_down_blk(addr) ((addr) & (~(SECTOR_SIZE - 1)))
#define round_up_blk(addr) (round_down_blk((addr) + SECTOR_SIZE - 1))
#define min(a, b) (a) < (b) ? (a) : (b)
#define EROFS_ROOT_XATTR_SZ (16 * 1024)

#define EROFS_UNIMPLEMENTED 1

Expand Down Expand Up @@ -641,6 +642,10 @@ int LibErofs::extract_tar(photon::fs::IFile *source, bool meta_only, bool first_
cfg.incremental = !first_layer;
erofs_cfg = erofs_get_configure();
erofs_cfg->c_ovlfs_strip = true;
if (first_layer)
erofs_cfg->c_root_xattr_isize = EROFS_ROOT_XATTR_SZ;
else
erofs_cfg->c_root_xattr_isize = 0;
cfg.mp_fp = std::tmpfile();

err = erofs_mkfs(&cfg);
Expand Down