From: Gao Xiang <hsiangkao@xxxxxxxxxxxxxxxxx>
Let's try to add a new mode "tarerofs" for mkfs.erofs.
It mainly aims at two use cases:
- Convert a tarball (or later tarballs with a merged view) into
a full EROFS image [--tar=f];
- Generate an EROFS manifest image to reuse tar data [--tar=i],
which also enables EROFS 512-byte blocks.
The second use case is mainly prepared for OCI direct mount without
OCI blob unpacking. This also adds another `--aufs` option to
transform aufs special files into overlayfs metadata.
[ Note that `--tar=f` generates lots of temporary files for now which
can impact performance since the original tar stream(s) may be
non-seekable. ]
Signed-off-by: Gao Xiang <hsiangkao@xxxxxxxxxxxxxxxxx>
Signed-off-by: Jingbo Xu <jefflexu@xxxxxxxxxxxxxxxxx>
---
changes:
- rebase to origin/dev branch
- remove commented code lines in tarerofs_parse_tar()
---
configure.ac | 1 +
include/erofs/blobchunk.h | 4 +-
include/erofs/inode.h | 12 +
include/erofs/internal.h | 7 +-
include/erofs/tar.h | 29 ++
include/erofs/xattr.h | 4 +
lib/Makefile.am | 3 +-
lib/blobchunk.c | 47 ++-
lib/inode.c | 194 ++++++---
lib/tar.c | 807 ++++++++++++++++++++++++++++++++++++++
lib/xattr.c | 46 ++-
mkfs/main.c | 134 +++++--
12 files changed, 1182 insertions(+), 106 deletions(-)
create mode 100644 include/erofs/tar.h
create mode 100644 lib/tar.c