Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 May 2014 11:49:10 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>, Bernd Walter <ticso@cicely7.cicely.de>, ticso@cicely.de, Ian Lepore <ian@freebsd.org>
Subject:   Re: TRIM on SD cards
Message-ID:  <C6388C10-C534-4141-B44C-1EEB29493A05@bsdimp.com>
In-Reply-To: <CAJ-Vmom=r9FA_HWLTjgThSZPncGw3dkCknNGCEpd=F39AJN8ww@mail.gmail.com>
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> <CAJ-Vmom=r9FA_HWLTjgThSZPncGw3dkCknNGCEpd=F39AJN8ww@mail.gmail.com>

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

--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 <adrian@freebsd.org> wrote:

> On 31 May 2014 09:45, Warner Losh <imp@bsdimp.com> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C6388C10-C534-4141-B44C-1EEB29493A05>