Rats - I was right the first time:  there's a messy problem with snapshots.
The problem is that the parent of the child that you're about to update in 
place may *already* be in one or more snapshots because one or more of its 
*other* children was updated since each snapshot was created.  If so, then each 
snapshot copy of the parent is pointing to the location of the existing copy of 
the child you now want to update in place, and unless you change the snapshot 
copy of the parent (as well as the current copy of the parent) the snapshot 
will point to the *new* copy of the child you are now about to update (with an 
incorrect checksum to boot).

With enough snapshots, enough children, and bad enough luck, you might have to 
change the parent (and of course all its ancestors...) in every snapshot.

In other words, Nathan's approach is pretty much infeasible in the presence of 
snapshots.  Background defragmention works as long as you move the entire 
region (which often has a single common parent) to a new location, which if the 
source region isn't excessively fragmented may not be all that expensive; it's 
probably not something you'd want to try at normal priority *during* an update 
to make Nathan's approach work, though, especially since you'd then wind up 
moving the entire region on every such update rather than in one batch in the 
background.

- bill
 
 
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