From owner-freebsd-arm@FreeBSD.ORG Sat May 31 17:49:15 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96F82881 for ; Sat, 31 May 2014 17:49:15 +0000 (UTC) Received: from mail-pb0-f44.google.com (mail-pb0-f44.google.com [209.85.160.44]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 62B042D25 for ; Sat, 31 May 2014 17:49:15 +0000 (UTC) Received: by mail-pb0-f44.google.com with SMTP id rq2so2835216pbb.3 for ; Sat, 31 May 2014 10:49:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=L6wFcLL/8HXkDHvJ2hlGozAafEtUf77CSBhElxFVwZo=; b=feordcPxeUUJziZ8Mii8JPIxvJw4nvw+NxGk28Riqxyh+B17WgZyIeAQodq3KhW+8l 2D9kM9d+ORhwTQVgchlfH5EVb+Fn+A1oIKWEFuceeKu7RXw4SNNEiPyahIk107wB8YQL f/UykoKtDlq6JyRew8KPc/V4I2xqCA/NksyfDYmo1PgnNj+KkQ3CPlpozePCt1aAE0MO XUfTksqgTOdj4EtHK0iCabcukNf/9+GzkxLOWHplRNX7NmXtI0yyMr9LU9njoJoZu/7l q3n/zf8z3oI5UzafmSltx4+tyyjCxzwaB5r6hD/hxHX1XVUnMvpFOu2m81bdQeAvkdlx xYaw== X-Gm-Message-State: ALoCoQnxf6aK0cdigczDs4YTFokXHtwPrUg35ozpdSNp4lBaQsZ1/g81cvb1ks2x9AmkL6NL18fo X-Received: by 10.68.242.135 with SMTP id wq7mr28000783pbc.147.1401558549590; Sat, 31 May 2014 10:49:09 -0700 (PDT) Received: from lgmac-rtangirala.corp.netflix.com (dc1-prod.netflix.com. [69.53.236.251]) by mx.google.com with ESMTPSA id wq10sm36905306pac.24.2014.05.31.10.49.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 31 May 2014 10:49:08 -0700 (PDT) Sender: Warner Losh Content-Type: multipart/signed; boundary="Apple-Mail=_5EF80B3B-98D6-41B7-9A6B-788C0F2F3B6E"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) Subject: Re: TRIM on SD cards From: Warner Losh In-Reply-To: Date: Sat, 31 May 2014 11:49:10 -0600 Message-Id: References: <20140531004306.GI26883@cicely7.cicely.de> <1401505209.20883.34.camel@revolution.hippie.lan> <20140531102305.GK26883@cicely7.cicely.de> <05005B04-1BDA-4242-946B-28D0DA069A42@bsdimp.com> To: Adrian Chadd X-Mailer: Apple Mail (2.1878.2) Cc: "freebsd-arm@freebsd.org" , Bernd Walter , ticso@cicely.de, Ian Lepore X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 May 2014 17:49:15 -0000 --Apple-Mail=_5EF80B3B-98D6-41B7-9A6B-788C0F2F3B6E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On May 31, 2014, at 11:31 AM, Adrian Chadd wrote: > On 31 May 2014 09:45, Warner Losh wrote: >=20 >> One of the things that I did for images years ago was compressed tar = files. There was so much variation between CF makers and at the time CF = geometry was important to the BIOS, so we made our images as tar balls. = We then had a makefile target that would create a partition on the card = that was actually there, put boot blocks on it then extract the tarball=85= I never have liked DD for creating images, even when LBAs ruled the = day because you=92d always have to grow/shrink the FS afterwards. The = only advantage it had was it was easy=85 Perhaps it is time to go back = to that model? The alternative that wouldn=92t suck too bad would be to = create variable sized images based on how much data was actually present = and ensure there are no holes (or minimal holes) in the filesystem. >>=20 >> Hmmm, if we know WHAT filesystem we=92re dealing with, then we could = perhaps enhance fsck and/or growfs to BIO_DELETE all the blocks that it = knows are free, which would be a useful, data-driven approach that could = ensure we start out with a nicely trimmed FS. Given the vagaries of the = different kinds of TRIMs and the various translation layers we have, = that might be the most robust. >=20 > Having makefs spit this out would be rather useful. I=92m not sure it would be. Any writes to the FS after you create it = would invalidate the list=85 Far easier to have fsck do it for you any = time you need it... Warner --Apple-Mail=_5EF80B3B-98D6-41B7-9A6B-788C0F2F3B6E Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJTihYWAAoJEGwc0Sh9sBEAsNEP/iiQ2M4RJVnHVZFWrJtqSbWo 6n+NWhW35joaG3MVOgwCdburr/OwIfn/X3KPsapMTnzfzAjhlp93BXM/4/FrtVDs /Et5ksG93BbreFcru5HRlqP2OF4h4m3lHCjTq8d1mTNIMdNeRotsfGyVmGuxK6Ap 5gDquaRi9/Y5djh8f+6z3Ca/QLSB4qXprML/jWFdh0skgcT9eIQftKmjYprgol5n 6f9HQHbj1mAUOcthw4JNbb4h5Bl8kknV2kf5Flb49RekuSce3WRPdPbNqWRwq6Nr wLQiBeKk+u7lN7dRZMVlPNXaJAd6r+UBmCHOhbxx4KNIW2TUowGg14eJ6toknmGX ein0/7snDWx/Ee1d9OGGMwRRLq0dlO1fcONywx+P9Q5TODH2/FtVlewI8yeEXfZQ VwxeOoh7vS49sZOxukqpmEdsDe5eWKmPT5Ot+T88EGgVhKXpMNLSLlPTsqbZBEQN P3Axw1UPnlI1DyQHz2Nkg8omGEnEAc2GRmc+9u9PbMkVq+PUFCuohMxtGh302KWd Ajkz8x3s2IZAcs5njyAJjVrSJrsL5B3GREitwHGPgHNRdsZfV0LOTg08Y/XhToGq cRrSbgE+2lZ7qiYXIaAcWas2qFfxTOUWdmHEixrZAetZ+Gn5TAtRCKhmSHY6Raqs tz8B3jy3QRKWlyLB13rT =jDja -----END PGP SIGNATURE----- --Apple-Mail=_5EF80B3B-98D6-41B7-9A6B-788C0F2F3B6E--