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

I used the wording "copies of a parent" loosely to mean "previous states of the 
parent that also contain pointers to the current state of the child about to be 
updated in place".

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

And in every earlier version of the parent that was updated for some *other* 
reason and still contains a pointer to the current child that someone using 
that snapshot must be able to follow correctly.

  So moving a block is
> just a case of updating one parent.

No:  every version of the parent that points to the current version of the 
child must be updated.

...

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

Only if it works the way you think it works, rather than, say, by using a 
look-aside list of moved blocks (there shouldn't be that many of them), or by 
just leaving the bad block in the snapshot (if it's mirrored or 
parity-protected, it'll still be usable there unless a second failure occurs; 
if not, then it was lost anyway).

- 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