Quick shot: What's wrong with maintaining a reference count? Free the block only when ref# is zero. Count the bytes in each fs it's in, but only once in (each of, recursively) the parent(s) -- maybe this is costly, 'cause now the parents size is not the sum of it's children. I don't know about the mathematical characteristics of the ZFS checksum, but I assume it's good to detect bit-errors and might not be good enough to find data suitable for aggregation.
Paul -- This messages posted from opensolaris.org