[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7nupludayogog6jylmwnxwel4zlvfxeozzcg5qkf5g5a5fpt7g@3bgvpbqfuxxa>
Date: Mon, 7 Apr 2025 13:40:08 +0200
From: Karel Zak <kzak@...hat.com>
To: Sheng Yong <shengyong2021@...il.com>
Cc: xiang@...nel.org, hsiangkao@...ux.alibaba.com, chao@...nel.org,
zbestahu@...il.com, jefflexu@...ux.alibaba.com, dhavale@...gle.com,
linux-erofs@...ts.ozlabs.org, linux-kernel@...r.kernel.org, Sheng Yong <shengyong1@...omi.com>,
Wang Shuai <wangshuai12@...omi.com>
Subject: Re: [PATCH v3 2/2] erofs: add 'offset' mount option for file-backed
& bdev-based mounts
On Mon, Apr 07, 2025 at 07:05:51PM +0800, Sheng Yong wrote:
> From: Sheng Yong <shengyong1@...omi.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
> 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.
Does it work with mount(8)? The mount option offset= has been defined
for decades as userspace-only and is used for loop devices. If I
remember correctly, libmount does not send the option to the kernel at
all. The option also triggers loop device usage by mount(8).
In recent years, we use the "X-" prefix for userspace options.
Unfortunately, loop=, offset=, and sizelimit= are older than any
currently used convention (I see the option in mount code from year
1998).
We can improve it in libmount and add any if-erofs hack there, but my
suggestion is to select a better name for the mount option. For
example, erofsoff=, erostart=, fsoffset=, start=, or similar.
Karel
--
Karel Zak <kzak@...hat.com>
http://karelzak.blogspot.com
Powered by blists - more mailing lists