From: Ferry Toth <fntoth@gmail.com>
To: linux-btrfs@vger.kernel.org, Qu Wenruo <wqu@suse.com>,
Qu Wenruo <quwenruo.btrfs@gmx.com>
Subject: Re: Errors on newly created file system
Date: Thu, 24 Apr 2025 22:11:37 +0200 [thread overview]
Message-ID: <d98ffb69-195b-4c07-ac56-8ae1f811af32@gmail.com> (raw)
In-Reply-To: <3309589.KRxA6XjA2N@ferry-quad>
Hi
Op 24-04-2025 om 13:31 schreef Ferry Toth:
>
> Op donderdag 24 april 2025 01:24:23 CEST schreef Qu Wenruo:
>
> >
>
> > 在 2025/4/24 01:36, Ferry Toth 写道:
>
> > > Op woensdag 23 april 2025 00:00:36 CEST schreef Qu Wenruo:
>
> > >
>
> > [...]
>
> >
>
> > >
>
> > > > > Yocto users on Scarthgap (5.0 LTS) with version 6.7.1 may
> copy the
>
> > >
>
> > > > > recipe meta/recipes-devtools/btrfs-tools/btrfs-tools_6.13.bb from
>
> > >
>
> > > > > walnascar or 6.14 from master. If they are building
> additional tools
>
> > >
>
> > > > > that use headers from this package like btrfs-compsize these
> may break.
>
> > >
>
> > > > >> Thanks,
>
> > >
>
> > > > >> Qu
>
> > >
>
> > >
>
> > > While here, am I right that we can not generate the rootfs with
>
> > > compression on?
>
> > >
>
> > >
>
> > > Reason I ask is, Yocto of course builds the rootfs and than has
>
> > > mkfs.btrfs create the image. But it runs as unprivileged user, so can
>
> > > not do mount.
>
> > >
>
> > > And then can not do defrag.
>
> >
>
> > We have this feature recently thanks to Mark!
>
> >
>
> > In the latest release v6.13, there is a new option "--compress"
> added to
>
> > mkfs.btrfs, which must be used with "--rootdir".
>
> >
>
> > And the result is exactly what you expected, mkfs.btrfs will try to
>
> > compress the file extents at runtime.
>
> > For uncompressible data, it will detect at the beginning and
> fallback to
>
> > uncompressed data instead, exactly like the kernel.
>
>
> That is great, thanks!
>
>
> > But considering how new this feature this, it will be appreciated if
>
> > Yocto guys can do some extra testing to make sure nothing is broken.
>
> > (Normally a btrfs check after the mkfs will be good enough)
>
> >
>
>
> I will test this.
>
>
> In the meanwhile I found another problem (and I am not the first it
> seems see
>
> /https://stackoverflow.com/questions/79475262/yocto-root-filesystem-ownership-issue/79590289#79590289/
> <https://stackoverflow.com/questions/79475262/yocto-root-filesystem-ownership-issue/79590289#79590289>)
>
>
> Yocto uses pseudo to fake root ownership. Even though the directory to
> be copied into the new fs is owned by an unprivileged user inside the
> btrfs image the files are owned by root, when created by mkfs.ext4 and
> mkfs.btrfs.
>
>
> Except with newer mkfs.btrfs (I tested using 6.13) the files are owned
> by the unprivileged user.
>
>
> The result is, the image will not boot correctly.
>
>
I found more about this issue here
https://lore.kernel.org/yocto/tRtu.1740682678597454399.5171@lists.yoctoproject.org/T/#m5de0afa17d2c0f640e86ffe67e0d74aea467fd5b
> > Thanks,
>
> > Qu
>
> >
>
> >
>
> > >
>
> > >
>
> > > > >
>
> > >
>
> > > > >
>
> > >
>
> > > >
>
> > >
>
> > > >
>
> > >
>
> > >
>
> > >
>
> >
>
> >
>
>
>
next prev parent reply other threads:[~2025-04-24 20:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-20 21:45 Errors on newly created file system Ferry Toth
2025-04-20 22:00 ` Qu Wenruo
2025-04-22 21:32 ` Ferry Toth
2025-04-22 22:00 ` Qu Wenruo
2025-04-23 16:06 ` Ferry Toth
2025-04-23 23:24 ` Qu Wenruo
2025-04-24 11:31 ` Ferry Toth
2025-04-24 20:11 ` Ferry Toth [this message]
2025-04-24 20:49 ` Qu Wenruo
2025-04-24 21:16 ` Ferry Toth
2025-04-26 21:01 ` Ferry Toth
2025-04-26 20:42 ` Ferry Toth
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=d98ffb69-195b-4c07-ac56-8ae1f811af32@gmail.com \
--to=fntoth@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
--cc=wqu@suse.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox