On 02/26/10 11:42, Lutz Schumann wrote:
Idea:
   - If the guest writes a block with 0's only, the block is freed again
   - if someone reads this block again - it wil get the same 0's it would get 
if the 0's would be written
    - The checksum of a "all 0" block dan be hard coded for SHA1 / Flecher, so the comparison 
for "is this a "0 only" block is easy.

With this in place, a host wishing to free thin provisioned zvol space can fill 
the unused blocks wirth 0s easity with simple tools (e.g. dd if=/dev/zero 
of=/MYFILE bs=1M; rm /MYFILE) and the space is freed again on the zvol side.

You've just described how ZFS behaves when compression is enabled -- a block of zeros is compressed to a hole represented by an all-zeros block pointer.

> Does anyone know why this is not incorporated into ZFS ?

It's in there.  Turn on compression to use it.


                                                - Bill




_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to