But the whole point of snapshots is that they don't take up extra space on the 
disk.  If a file (and hence a block) is in every snapshot it doesn't mean 
you've got multiple copies of it.  You only have one copy of that block, it's 
just referenced by many snapshots.

The thing is, the location of that block isn't saved separately in every 
snapshot either - the location is just stored in it's parent.  So moving a 
block is just a case of updating one parent.  So regardless of how many 
snapshots the parent is in, you only have to update one parent to point it at 
the new location for the *old* data.  Then you save the new data to the old 
location and ensure the current tree points to that.

If you think about it, that has to work for the old data since as I said 
before, ZFS already has this functionality.  If ZFS detects a bad block, it 
moves it to a new location on disk.  If it can already do that without 
affecting any of the existing snapshots, so there's no reason to think we 
couldn't use the same code for a different purpose.

Ultimately, your old snapshots get fragmented, but the live data stays 
contiguous.
 
 
This message posted from opensolaris.org
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to