提交 9345457f 编写于 作者: J Jan Schmidt

Btrfs: support root level changes in __resolve_indirect_ref

With the tree mod log, we can have a tree that's two levels high, but
btrfs_search_old_slot may still return a path with the tree root at level
one instead. __resolve_indirect_ref must care for this and accept parents in
a lower level than expected.
Signed-off-by: NJan Schmidt <list.btrfs@jan-o-sch.net>
上级 8ca78f3e
......@@ -301,11 +301,15 @@ static int __resolve_indirect_ref(struct btrfs_fs_info *fs_info,
goto out;
eb = path->nodes[level];
if (!eb) {
while (!eb) {
if (!level) {
WARN_ON(1);
ret = 1;
goto out;
}
level--;
eb = path->nodes[level];
}
ret = add_all_parents(root, path, parents, level, &ref->key_for_search,
time_seq, ref->wanted_disk_byte,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册