Currently btrfs-image doesn't copy the tree logs, which doesn't help me when
we're trying to debug log replay bugs. Since we don't have entries in the
extent root for the blocks we have to walk down all of the trees in order to
copy them. With this patch I can image a file system with a tree log and it
works fine. Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
We use BUG_ON() everywhere in btrfs-image. When users are going to use this
command things are pretty dire, so I'd rather have really good error messages so
I know what happened rather than figure out which one of the 20 BUG_ON()'s made
the stupid thing exit early. Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
"mdresotre" sounds like it might be French, but most
likely it's a misspelling of mdrestore. Fix it.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Zach Brown <zab@redhat.com>
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
This patch adds btrfs image tool. The image tool is
a debugging tool that creates/restores btrfs metadump
image.
Signed-off-by: Yan Zheng <zheng.yan@oracle.com>