Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@linux.intel.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [RFC PATCH 0/2] Fully support ext3/ext4 rootfs generation
Date: Sun, 03 Mar 2013 09:15:26 -0800	[thread overview]
Message-ID: <5133852E.2010504@linux.intel.com> (raw)
In-Reply-To: <1362224344.11004.14.camel@ted>



On 03/02/2013 03:39 AM, Richard Purdie wrote:
> On Sat, 2013-03-02 at 18:46 +0800, Robert Yang wrote:
>> Replace genext2fs with populate-extfs.sh in image_types.bbclass to fully
>> support ext3/ext4 rootfs.
>>
>> Comments from Darren:
>> We used genext2fs to create ext3/ext4 rootfs in the past, basically,
>> genext2fs doesn't support creating ext4 filesystems. It creates, as I
>> understand it, an ext2 filesystem, then adds a journal, and sets some
>> bits. It can't support the newer features like extents. So what we end
>> up with is a bit of a hack for a filesystem.
>>
>> The ext tools (e2fsprogs) unfortunately don't provide an integrated
>> solution for generating prepopulated filesystem images as many other
>> mkfs* tools do. One thing missing was symlink support in libext2fs. I
>> added that support and demonstrated a script which uses the e2fsprogs
>> debugfs tool that can populate the newly formatted filesystem from a
>> directory and without root privileges.
>>
>> This patches integrate this stage of development into OE-Core. We can
>> go about this in two ways. One is to just prototype this in a branch and
>> use it to validate the functionality and not make any changes to oe-core
>> image generation until mke2fs has initial directory support. The other
>> is to merge this and get broader testing of the concept and later move
>> to the full mke2fs implementation once it becomes available. I
>> understand the resistance to the latter, but long term I think it will
>> result in a more robust solution as we will have caught more of the
>> corner cases and have been able to do a better job integrating into
>> mke2fs the first time.
>>
>>
>> * Impact:
>>   + Rootfs generation time:
>>     - For a core-image-minimal image, about more 3 seconds are needed
>>     - For a core-image-sato image, about more 15 seconds are needed
>>
>>   + Disk space usage:
>>     - Nearly no changes:
>>     $ ls -lh BEFORE.rootfs.ext3 AFTER.rootfs.ext3 | awk '{print $5"\t"$NF}'
>>     357M BEFORE.rootfs.ext3
>>     357M AFTER.rootfs.ext3
>>     
>>     $ du -sh BEFORE.rootfs.ext3 AFTER.rootfs.ext3
>>     238M    BEFORE.rootfs.ext3
>>     357M    AFTER.rootfs.ext3
>>     # This is different because BEFORE.rootfs.ext3 has sparse files,
>>     # they are very similar (less than 1M gap) after mount them and run
>>     # "du -sh".
> 
> I can live with the performance issues however as I understand this
> code, its breaking both sparse files and also likely hardlinked files.
> I'm not sure we have many sparse ones but we do have packages with heavy
> hardlinking (the sdk image toolchain packages for example).
> 
> Adding the script to e2fsprogs isn't a problem but I am tempted to wait
> until this work is completed before we start using it instead of
> genext2fs.


Agreed, I thought we were within 1MB on size from my reading of the
previous discussion. Robert, do you have any thoughts on what is needed
to address the hardlinks? That seems like something we should be able to
address quickly.

Same question for the sparse files, although I could see that taking
some additional effort.


-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel



  reply	other threads:[~2013-03-03 17:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-02 10:46 [RFC PATCH 0/2] Fully support ext3/ext4 rootfs generation Robert Yang
2013-03-02 10:46 ` [RFC PATCH 1/2] e2fsprogs: add populate-extfs.sh Robert Yang
2013-03-02 10:46 ` [RFC PATCH 2/2] image_types.bbclass: replace genext2fs with populate-extfs.sh Robert Yang
2013-03-02 11:39 ` [RFC PATCH 0/2] Fully support ext3/ext4 rootfs generation Richard Purdie
2013-03-03 17:15   ` Darren Hart [this message]
2013-03-03 18:21     ` Darren Hart
2013-03-04 13:42       ` Robert Yang
2013-03-04 14:09         ` Robert Yang
2013-03-04 14:10         ` Richard Purdie
2013-03-04 16:09           ` Darren Hart
2013-03-05  8:24           ` Robert Yang

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=5133852E.2010504@linux.intel.com \
    --to=dvhart@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox