In that case, this may be a much tougher nut to crack than I thought.

I'll be the first to admit that other than having seen a few presentations I 
don't have a clue about the details of how ZFS works under the hood, however...

You mention that moving the old block means updating all it's ancestors.  I had 
naively assumed moving a block would be relatively simple, and would also 
update all the ancestors.  

My understanding of ZFS (in short: an upside down tree) is that each block is 
referenced by it's parent.  So regardless of how many snapshots you take, each 
block is only ever referenced by one other, and I'm guessing that the pointer 
and checksum are both stored there.

If that's the case, to move a block it's just a case of:
 - read the data
 - write to the new location
 - update the pointer in the parent block

Please let me know if I'm mis-understanding ZFS here.

The major problem with this is that I don't know if there's any easy way to 
identify the parent block from the child, or an effcient way to do this move.  
However, thinking about it, there must be.  ZFS intelligently moves data if it 
detects corruption, so there must already be tools in place to do exactly what 
we need here.

In which case, this is still relatively simple and much of the code already 
exists.
 
 
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