On Sat, Dec 19, 2009 at 7:20 PM, Bob Friesenhahn
<bfrie...@simple.dallas.tx.us> wrote:
> On Sat, 19 Dec 2009, Colin Raven wrote:
>>
>> There is no original, there is no copy. There is one block with reference
>> counters.
>>
>> - Fred can rm his "file" (because clearly it isn't a file, it's a filename
>> and that's all)
>> - result: the reference count is decremented by one - the data remains on
>> disk.
>
> While the similarity to hard links is a good analogy, there really is a
> unique "file" in this case.  If Fred does a 'rm' on the file then the
> reference count on all the file blocks is reduced by one, and the block is
> freed if the reference count goes to zero.  Behavior is similar to the case
> where a snapshot references the file block.  If Janet updates a block in the
> file, then that updated block becomes unique to her "copy" of the file (and
> the reference count on the original is reduced by one) and it remains unique
> unless it happens to match a block in some other existing file (or snapshot
> of a file).
>
> When we are children, we are told that sharing is good.  In the case or
> references, sharing is usually good, but if there is a huge amount of
> sharing, then it can take longer to delete a set of files since the mutual
> references create a "hot spot" which must be updated sequentially.  Files
> are usually created slowly so we don't notice much impact from this sharing,
> but we expect (hope) that files will be deleted almost instantaneously.

I believe this has been taken care of in space maps design
(http://blogs.sun.com/bonwick/entry/space_maps provides a nice
overview).

Regards,
Andrey

>
> Bob
> --
> Bob Friesenhahn
> bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
> GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
> _______________________________________________
> zfs-discuss mailing list
> zfs-discuss@opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
>
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to