Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Oct 2015 01:04:53 -0700
From:      NGie Cooper <yaneurabeya@gmail.com>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r289203 - head/usr.sbin/makefs
Message-ID:  <F399C99D-F2A1-441C-ACC8-EF418A5F46ED@gmail.com>
In-Reply-To: <201510130232.t9D2WFo2034264@repo.freebsd.org>
References:  <201510130232.t9D2WFo2034264@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

> On Oct 12, 2015, at 19:32, Adrian Chadd <adrian@freebsd.org> wrote:
>=20
> Author: adrian
> Date: Tue Oct 13 02:32:15 2015
> New Revision: 289203
> URL: https://svnweb.freebsd.org/changeset/base/289203
>=20
> Log:
>  makefs: introduce a new option to specify what to round the resulting
>  image up to.
>=20
>  =46rom ticket:
>=20
>  While trying to run FreeBSD/mips on some device having very small =
flash media,
>  one is forced to compress file system with mkulzma(8) utility. It is =
desirable
>  to specify small UFS block/fragment sizes like 4096/512 bytes for =
makefs(8)
>  and big compression block size like 65535 bytes to mkulzma at the =
same time.
>  Then one obtains very good comression ratios (like 75% and more) but =
faces
>  the following problem.
>=20
>  geom_uncompress kernel module reports GEOM provider size rounded up =
to its
>  compression block size. Generally, this changes original media size =
and now
>  it fails to match the size of embedded UFS file system that leads to =
other
>  problems, f.e. geom_label kernel module does not like this and skips =
the
>  file system while tasting the GEOM and looking for UFS label.
>=20
>  This makes it impossible to refer to the file system using known UFS =
label
>  instead of something like /dev/map/rootfs.uncompress.
>=20
>  The following patch introduces new command line option "-r roundup" =
for makefs
>  that makes it round up the image to specified block size. Hence, =
geom_uncompress
>  does not change GEOM media size for images rounded that way and =
geom_label
>  accepts such GEOMs just fine.
>=20
>  With the patch applied, one can use following commands:
>=20
>  $ makefs -t ffs -r 65536 -o bsize=3D4096,fsize=3D512,label=3Dflash =
optimization=3Dspace fs.img fs
>  $ mkulzma -s 65536 -o fs.img.ulzma fs.img
>=20
>  PR:		bin/203707
>  Submitted by:	<eugen@grosbein.net>

1. roundup doesn=E2=80=99t seem like a user-friendly name.
2. =E2=80=9Croundup=E2=80=9D isn=E2=80=99t documented under the =
FFS-specific options.

I=E2=80=99m going to send out a CR soon updating the documentation and =
changing -r to -R.

Thanks,
-NGie=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F399C99D-F2A1-441C-ACC8-EF418A5F46ED>