Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Aug 2012 11:41:20 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Petri Helenius <petri@helenius.fi>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: zero deleted blocks
Message-ID:  <20120813084120.GA2352@deviant.kiev.zoral.com.ua>
In-Reply-To: <7BDA02A3-99ED-4F67-9B2D-5AAF1523642E@helenius.fi>
References:  <7BDA02A3-99ED-4F67-9B2D-5AAF1523642E@helenius.fi>

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

--GvXjxJ+pjyke8COw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Aug 13, 2012 at 09:01:57AM +0300, Petri Helenius wrote:
>=20
> Hi,
>=20
> Is it possible to have ZFS or UFS to zero out the deallocated blocks
> to facilitate VM disk compaction?

I think TRIM support in UFS can be extended to zero-out the deleted
blocks, with relatively small amount of work. Basically, in
ufs/ffs/ffs_alloc.c:ffs_blkfree(), a BIO_WRITE of zero buffer shall be
issued instead of BIO_DELETE.

More, it seems that zero_region can be often used as a source of zeroes.

--GvXjxJ+pjyke8COw
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (FreeBSD)

iEYEARECAAYFAlAovbAACgkQC3+MBN1Mb4g3pQCghN2SVIK/H1lFD+hTeaf5y4/F
YsUAoOb0gHTojP6R0DfCq/SBcrBiVpHA
=ZjGj
-----END PGP SIGNATURE-----

--GvXjxJ+pjyke8COw--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120813084120.GA2352>