Another way that ZFS ensures the integrity of data is using copy-on-write methodology. Whenever an existing block is modified, ZFS first copies that data to a new block, and then modifies that data in place and updates the file metadata to reflect those changes. The old blocks can then be marked for deletion, or, if necessary, can be kept for snapshots.