Mixed back reference (FORWARD ROLLING FORMAT CHANGE)
commit95d3f20b51e9b2ee21822313ad4f31279396407b
authorChris Mason <chris.mason@oracle.com>
Fri, 29 May 2009 20:35:30 +0000 (29 16:35 -0400)
committerChris Mason <chris.mason@oracle.com>
Mon, 8 Jun 2009 17:30:36 +0000 (8 13:30 -0400)
treeb120e33ca9ad3f04a0a32b62451e6ba5926b2ca0
parent2d39a83829bfc26f0c79b33fca64540c634f7f18
Mixed back reference  (FORWARD ROLLING FORMAT CHANGE)

This commit introduces a new kind of back reference for btrfs metadata.
Once a filesystem has been mounted with this commit, IT WILL NO LONGER
BE MOUNTABLE BY OLDER KERNELS.

The new back ref provides information about pointer's key, level and in which
tree the pointer lives. This information allow us to find the pointer by
searching the tree. The shortcoming of the new back ref is that it only works
for pointers in tree blocks referenced by their owner trees.

This is mostly a problem for snapshots, where resolving one of these fuzzy back
references would be O(number_of_snapshots) and quite slow.  The solution used
here is to use the fuzzy back references in the common case where a given tree
block is only referenced by one root, and use the full back references when
multiple roots have a reference
15 files changed:
Makefile
btrfs-image.c
btrfsck.c
crc32c.h
ctree.c
ctree.h
debug-tree.c
disk-io.c
disk-io.h
extent-tree.c
extent_io.c
kerncompat.h
mkfs.c
print-tree.c
utils.c