Is this function used?
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 14 lines · Siddhartha Swaroop
Hello ,
Inside the file
ctree.cat line 762 there is a function calledcheck_block( ). The source code of that function is as followsstatic noinline int check_block(struct
btrfs_root*root,
structbtrfs_path*path, int level){ return 0; if (level == 0) return check_leaf(root, path, level); return check_node(root, path, level); }
Quoted 7 lines
This function is called by
balance_levelandbtrfs_search_slotfunctions.By seeing this
check_blockfunction 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