zfsonlinux/zfs — pull request #2896 by dweeezil (2014-11-14 06:22:59+00:00)
Title: Prevent ZFS leaking pool free space

When processing async destroys ZFS would leak space every txg timeout
(5 seconds by default), if no writes occurred, until the pool is totally
full. At this point it would be unfixable without a pool recreation.

In addition if the machine was rebooted with the pool in this situation
would fail to import on boot, hanging indefinitely, as the import process
requires the ability to write data to the pool. Any attempts to query
the pool status during the hung import would not return as the import
holds the pool lock.

The only way to import such a pool would be to specify -o readonly=on
to the zpool import.

zdb -bb can be used to check for "deferred free" size which is
where this lost space will be counted.

Ported by:	Tim Chase

References:
https://github.com/freebsd/freebsd/commit/48431b7da604b11c9ab6178a25c2e8da0833933e
http://svnweb.freebsd.org/base?view=revision&revision=273158