]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFstable/10 r290589:
authorngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 9 Nov 2015 09:02:30 +0000 (09:02 +0000)
committerngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 9 Nov 2015 09:02:30 +0000 (09:02 +0000)
commitcd6e15f0318eb2a661da32e0fd36a85929b73d20
treead30a89e943b45e1beac86506025023b0e157495
parentd34355e98d6c2daae516e5bfbc40cc16154525a6
MFstable/10 r290589:

MFC r289203,r290180:

r289203 (by adrian):

makefs: introduce a new option to specify what to round the resulting
image up to.

From ticket:

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.

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.

This makes it impossible to refer to the file system using known UFS label
instead of something like /dev/map/rootfs.uncompress.

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.

With the patch applied, one can use following commands:

$ makefs -t ffs -r 65536 -o bsize=4096,fsize=512,label=flash optimization=space fs.img fs
$ mkulzma -s 65536 -o fs.img.ulzma fs.img

PR: bin/203707
Submitted by: <eugen@grosbein.net>

r290180:

Follow up to roundup feature addition in r289203

- Rename -r to -R to avoid the clash with makefs -r in NetBSD
- Note that -R is an FFS-specific option because it's not implemented
  in cd9660 today
- Rename the roundup variable to "roundup-size" in the manpage and help
  text for consistency with other variables.
- Bump .Dd (missed in r289203)

PR: 203707
Differential Revision: https://reviews.freebsd.org/D3959
Reviewed by: adrian (earlier patch), emaste
Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/9@290590 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.sbin/makefs/ffs.c
usr.sbin/makefs/makefs.8
usr.sbin/makefs/makefs.c
usr.sbin/makefs/makefs.h