Re: Question about back references

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 08, 2009 at 05:40:07PM -0400, Peter Macko wrote:
> Thanks! I have a follow up question: Are back references reference
> counted? If so, this should mean that after the file system COWs an
> inode, it must increase the reference counts of its file extent back
> references. Do we know what is the overhead? In the case they are
> not reference counted, how does the system know when to drop the
> reference?

The reference counts live in a tree that is maintained via cow
but not reference counted.

> 
> What are the bookend extents? Is the number of bookend requests in
> the fourth field of a file extent back reference  the number of
> times the extent occurs within the file?

bookends are how we do cow with large extents without needing to read in
the entire large extent.

Picture a large 128MB extent where you want to overwrite 4K in the
middle.  What we do is create two pointers to the original extent, and
then make a new extent for the new 4K mod.  Our pointers end up like
this:

[ old extent part 1 ] [ new 4k extent ] [ old extent part 2 ]

A future mod will be to split and modify the old extent when we know
there aren't any other reference holders on it.  The bookend system
assumes that a given extent is in use by multiple snapshots, where we
aren't allowed to change the actual extent records because it is in use in
other places.

-chris
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux