On Wed, 2009-04-22 at 16:39 +0530, Siddhartha Swaroop
wrote:> Hello ,
>
> Inside the file ctree.c at line 762 there is a function called
> check_block( ). The source code of that function is as follows
>
> static noinline int check_block(struct btrfs_root *root,
> struct btrfs_path *path, int level)
> {
> return 0;
> if (level == 0)
> return check_leaf(root, path, level);
> return check_node(root, path, level);
> }
>
> This function is called by balance_level and btrfs_search_slot
> functions.
>
> By seeing this check_block function u may come to know that this
> function will not work if it is called,it will just return zero (means
> success) without doing anyother work.
> I need to know why this code is written?
We should put the return 0 inside CONFIG option for more extensive
metadata checking. I enable check_block when I''m making changes that
are likely to cause corruptions in the btree code. It tends to find
them more quickly.
-chris
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs"
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html