On 04/28/2016 11:35 PM, Qu Wenruo wrote:
Josef Bacik wrote on 2016/04/28 10:13 -0400:
On 04/25/2016 11:48 PM, Qu Wenruo wrote:
From: Lu Fengqi <lufq.fnst@xxxxxxxxxxxxxx>
Introduce function query_tree_block_level() to resolve tree block level
by reading out the tree block.
Signed-off-by: Lu Fengqi <lufq.fnst@xxxxxxxxxxxxxx>
Signed-off-by: Qu Wenruo <quwenruo@xxxxxxxxxxxxxx>
---
This skips the check_tree_block if the transid passes, but we could have
a matching transid but a corrupt item. You need to fix
read_tree_block_fs_info to always call check_block so we can be sure
that our btrfs_header_level() is valid here. Thanks,
Josef
read_tree_block_fs_info(or read_tree_block) will call check_tree_block()
and verify_parent_transid() if it doesn't find a cached extent buffer.
So I don't think we need to do further modification to
read_tree_block_fs_info().
But your comment reminds me that, we did miss the generation check, as
we can get generation from backref, and when we can, we should also
check transid.
We will add transid check from metadata backref.
Sigh I was looking at an older version of btrfs-progs, you are right.
Thanks,
Josef
--
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