* Re: Is this function used?
[not found] <d853ebb60904220409w20ed0e55y6834cd5de0d06a2@mail.gmail.com>
@ 2009-04-22 13:23 ` Chris Mason
0 siblings, 0 replies; only message in thread
From: Chris Mason @ 2009-04-22 13:23 UTC (permalink / raw)
To: Siddhartha Swaroop; +Cc: linux-btrfs
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-22 13:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <d853ebb60904220409w20ed0e55y6834cd5de0d06a2@mail.gmail.com>
2009-04-22 13:23 ` Is this function used? Chris Mason
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox