From: Gao Xiang <xiang@kernel.org>
To: Mingye Wang <arthur200126@gmail.com>,
hsiangkao@linux.alibaba.com, linux-erofs@lists.ozlabs.org,
derez@redhat.com
Subject: Re: [feature request] extract a single file from EROFS filesystem
Date: Mon, 14 Jul 2025 08:18:34 +0800 [thread overview]
Message-ID: <aHRM2g7y/zNlQDsp@debian> (raw)
In-Reply-To: <aHRJBVY1r0epiRpy@debian>
On Mon, Jul 14, 2025 at 08:02:13AM +0800, Gao Xiang wrote:
> Hi Mingye,
>
> On Mon, Jul 14, 2025 at 12:55:06AM +0800, Mingye Wang wrote:
> > Hi all,
> >
> > >Gao Xiang Thu, 09 Jan 2025 01:36:16 -0800
> > >On 2025/1/9 02:14, Daniel Erez wrote:
> > >>Would it be applicable to introduce an option for extracting a specific file
> > >>from the image?
> > >>I.e. something similar to the '-extract-file' option available in unsquashfs tool [2].
> > >I will add this later.
> >
> > I am seeing a need for a similar feature in making dracut's lsinitrd
> > work... a little better. I should add two cents of my own.
>
> dump.erofs already supports `--cat` command to dump a single file.
>
> >
> > * In "unsquashfs" there's not only '-extract-file' for passing in a
> > list of files, but also a possibility for a list of paths to be
> > specified directly as arguments. This would appear outlandish on an
> > fsck utility.
>
> Can those be replaced as dump.erofs --cat?
>
> > * When extracting single files it might be desirable to *not* verify
> > and pretend-extract the other files.
>
> `fsck.erofs` can be used to dump a subtree in the future (exclude file
> pattern can be applied), fsck/dump/mkfs tools are more common for
> generic filesystems.
>
> Mimick Squashfs-specific is not EROFS will do since I do see `un`-prefix
> is common and lack of (even defacto) standardization.
In other words, if you care more about a subtree or a whole filesystem
dump, all (sub-)tree metadata/data should be checked first, and that is
what `fsck.erofs` does and the dumped files are only side products for
data verification (because fsck needs to check compressed data is valid
too.)
If you only care about some individual inodes, that is what `dump.erofs`
works, including `--cat` shows inode content, `--ls` shows directory
content, `-e` shows extent map, etc.
Thanks,
Gao Xiang
>
> Thanks,
> Gao Xiang
>
next prev parent reply other threads:[~2025-07-14 0:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-13 16:55 [feature request] extract a single file from EROFS filesystem Mingye Wang
2025-07-14 0:02 ` Gao Xiang
2025-07-14 0:18 ` Gao Xiang [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-01-08 18:14 Daniel Erez
2025-01-09 9:35 ` Gao Xiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aHRM2g7y/zNlQDsp@debian \
--to=xiang@kernel.org \
--cc=arthur200126@gmail.com \
--cc=derez@redhat.com \
--cc=hsiangkao@linux.alibaba.com \
--cc=linux-erofs@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.