zero deleted blocks

Konstantin Belousov kostikbel at gmail.com
Mon Aug 13 08:41:32 UTC 2012


On Mon, Aug 13, 2012 at 09:01:57AM +0300, Petri Helenius wrote:
> 
> Hi,
> 
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20120813/f493aa9d/attachment.pgp


More information about the freebsd-fs mailing list