[PATCH v7] erofs: add 'fsoffset' mount option to specify filesystem offset
Gao Xiang
hsiangkao at linux.alibaba.com
Sat May 17 23:38:02 AEST 2025
On 2025/5/17 17:05, Sheng Yong wrote:
> From: Sheng Yong <shengyong1 at xiaomi.com>
>
> When attempting to use an archive file, such as APEX on android,
> as a file-backed mount source, it fails because EROFS image within
> the archive file does not start at offset 0. As a result, a loop
> or a dm device is still needed to attach the image file at an
> appropriate offset first. Similarly, if an EROFS image within a
> block device does not start at offset 0, it cannot be mounted
> directly either.
>
> To address this issue, this patch adds a new mount option `fsoffset=x'
> to accept a start offset for the primary device. The offset should be
> aligned to the block size. EROFS will add this offset before performing
> read requests.
>
> Signed-off-by: Sheng Yong <shengyong1 at xiaomi.com>
> Signed-off-by: Wang Shuai <wangshuai12 at xiaomi.com>
Reviewed-by: Gao Xiang <hsiangkao at linux.alibaba.com>
Thanks,
Gao Xiang
More information about the Linux-erofs
mailing list