From owner-svn-src-all@freebsd.org Wed Oct 21 08:04:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20621A1A06A; Wed, 21 Oct 2015 08:04:56 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x22e.google.com (mail-pa0-x22e.google.com [IPv6:2607:f8b0:400e:c03::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E7D9614BB; Wed, 21 Oct 2015 08:04:55 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pacfv9 with SMTP id fv9so49718220pac.3; Wed, 21 Oct 2015 01:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ZZtqyAPyXZ8nDjI0llOGh4yU62yPcDAFD6MLiW6nRCc=; b=LWJSRI41T7pPWkB4BU15RJF3pfWm1FSKqNeGJNBVbTE/4NtoBG1rXFWPT3GiPYsXWi EPb+Jd6fKexDK2zVTm969noobN7xYZc/EigM7reP7u92zp2za7ghunVWkAZVEVyIfwWE d6IayBs6Tt/YoQSP7Spe+IhC/n9ikmZ+IBu1QQwhiU+XtfJeTbh9w/19QdjJrZfVF6H0 MozfCoQsuAoNwnCo6lUFrXNtgBcGb8W9bgLL7s1hE5QXsfYblewPmcRgnyc6erg7Ais1 7xAGurcHfboDCz89pODEunzt6pvipIQSoy0oSV4oOOTl7Ccz5OGZkkfV8UNDYPCALlcJ mnrg== X-Received: by 10.68.242.130 with SMTP id wq2mr8994332pbc.117.1445414695350; Wed, 21 Oct 2015 01:04:55 -0700 (PDT) Received: from ?IPv6:2601:601:800:126d:ed49:68d3:f4e:e5ab? ([2601:601:800:126d:ed49:68d3:f4e:e5ab]) by smtp.gmail.com with ESMTPSA id of1sm7688023pbc.11.2015.10.21.01.04.54 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Oct 2015 01:04:54 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r289203 - head/usr.sbin/makefs From: NGie Cooper In-Reply-To: <201510130232.t9D2WFo2034264@repo.freebsd.org> Date: Wed, 21 Oct 2015 01:04:53 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201510130232.t9D2WFo2034264@repo.freebsd.org> To: Adrian Chadd X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Oct 2015 08:04:56 -0000 > On Oct 12, 2015, at 19:32, Adrian Chadd 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: 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=