Skip to content
Commit 8b465fec authored by Jia Zhu's avatar Jia Zhu Committed by Gao Xiang
Browse files

erofs: support flattened block device for multi-blob images

In order to support mounting multi-blobs container image as a single
block device, add flattened block device feature for EROFS.

In this mode, all meta/data contents will be mapped into one block
space. User could compose a block device(by nbd/ublk/virtio-blk/
vhost-user-blk) from multiple sources and mount the block device by
EROFS directly. It can reduce the number of block devices used, and
it's also benefits in both VM file passthrough and distributed storage
scenarios.

You can test this using the method mentioned by:
https://github.com/dragonflyoss/image-service/pull/1139


1. Compose a (nbd)block device from multi-blobs.
2. Mount EROFS on mntdir/.
3. Compare the md5sum between source dir and mntdir/.

Later, we could also use it to refer original tar blobs.

Signed-off-by: default avatarJia Zhu <zhujia.zj@bytedance.com>
Signed-off-by: default avatarXin Yin <yinxin.x@bytedance.com>
Reviewed-by: default avatarJingbo Xu <jefflexu@linux.alibaba.com>
Acked-by: default avatarChao Yu <chao@kernel.org>
Tested-by: default avatarJiang Liu <gerry@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230302071751.48425-1-zhujia.zj@bytedance.com


[ Gao Xiang: refine commit message and use erofs_pos(). ]
Signed-off-by: default avatarGao Xiang <hsiangkao@linux.alibaba.com>
parent d3c4bdcc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment