Linux Kernel
3.7.1
|
#include <linux/module.h>
#include <linux/debugfs.h>
#include <linux/math64.h>
#include <linux/uaccess.h>
#include <linux/random.h>
#include "ubifs.h"
Go to the source code of this file.
Data Structures | |
struct | fsck_inode |
struct | fsck_data |
Variables | |
struct ubifs_global_debug_info | ubifs_dbg |
int dbg_check_data_nodes_order | ( | struct ubifs_info * | c, |
struct list_head * | head | ||
) |
dbg_check_data_nodes_order - check that list of data nodes is sorted. : UBIFS file-system description object : the list of nodes ('struct ubifs_scan_node' objects)
This function returns zero if the list of data nodes is sorted correctly, and %-EINVAL if not.
int dbg_check_filesystem | ( | struct ubifs_info * | c | ) |
dbg_check_filesystem - check the file-system. : UBIFS file-system description object
This function checks the file system, namely: o makes sure that all leaf nodes exist and their CRCs are correct; o makes sure inode nlink, size, xattr size/count are correct (for all inodes).
The function reads whole indexing tree and all nodes, so it is pretty heavy-weight. Returns zero if the file-system is consistent, %-EINVAL if not, and a negative error code in case of failure.
int dbg_check_idx_size | ( | struct ubifs_info * | c, |
long long | idx_size | ||
) |
int dbg_check_nondata_nodes_order | ( | struct ubifs_info * | c, |
struct list_head * | head | ||
) |
dbg_check_nondata_nodes_order - check that list of data nodes is sorted. : UBIFS file-system description object : the list of nodes ('struct ubifs_scan_node' objects)
This function returns zero if the list of non-data nodes is sorted correctly, and %-EINVAL if not.
int dbg_check_space_info | ( | struct ubifs_info * | c | ) |
dbg_check_space_info - check flash space information. : UBIFS file-system description object
This function compares current flash space information with the information which was saved when the 'dbg_save_space_info()' function was called. Returns zero if the information has not changed, and %-EINVAL it it has changed.
dbg_check_synced_i_size - check synchronized inode size. : UBIFS file-system description object : inode to check
If inode is clean, synchronized inode size has to be equivalent to current inode size. This function has to be called only for locked inodes ( has to be locked). Returns %0 if synchronized inode size if correct, and %-EINVAL if not.
int dbg_check_tnc | ( | struct ubifs_info * | c, |
int | extra | ||
) |
dbg_check_tnc - check TNC tree. : UBIFS file-system description object : do extra checks that are possible at start commit
This function traverses whole TNC tree and checks every znode. Returns zero if everything is all right and %-EINVAL if something is wrong with TNC.
void dbg_debugfs_exit_fs | ( | struct ubifs_info * | c | ) |
dbg_debugfs_init - initialize debugfs file-system.
UBIFS uses debugfs file-system to expose various debugging knobs to user-space. This function creates "ubifs" directory in the debugfs file-system. Returns zero in case of success and a negative error code in case of failure.
int dbg_debugfs_init_fs | ( | struct ubifs_info * | c | ) |
dbg_debugfs_init_fs - initialize debugfs for UBIFS instance. : UBIFS file-system description object
This function creates all debugfs files for this instance of UBIFS. Returns zero in case of success and a negative error code in case of failure.
Note, the only reason we have not merged this function with the 'ubifs_debugging_init()' function is because it is better to initialize debugfs interfaces at the very end of the mount process, and remove them at the very beginning of the mount process.
void dbg_save_space_info | ( | struct ubifs_info * | c | ) |
int dbg_walk_index | ( | struct ubifs_info * | c, |
dbg_leaf_callback | leaf_cb, | ||
dbg_znode_callback | znode_cb, | ||
void * | priv | ||
) |
dbg_walk_index - walk the on-flash index. : UBIFS file-system description object : called for each leaf node : called for each indexing node : private data which is passed to callbacks
This function walks the UBIFS index and calls the for each leaf node and for each indexing node. Returns zero in case of success and a negative error code in case of failure.
It would be better if this function removed every znode it pulled to into the TNC, so that the behavior more closely matched the non-debugging behavior.
void ubifs_debugging_exit | ( | struct ubifs_info * | c | ) |
int ubifs_debugging_init | ( | struct ubifs_info * | c | ) |
void ubifs_dump_budg | ( | struct ubifs_info * | c, |
const struct ubifs_budg_info * | bi | ||
) |
void ubifs_dump_budget_req | ( | const struct ubifs_budget_req * | req | ) |
void ubifs_dump_heap | ( | struct ubifs_info * | c, |
struct ubifs_lpt_heap * | heap, | ||
int | cat | ||
) |
void ubifs_dump_index | ( | struct ubifs_info * | c | ) |
ubifs_dump_index - dump the on-flash index. : UBIFS file-system description object
This function dumps whole UBIFS indexing B-tree, unlike 'ubifs_dump_tnc()' which dumps only in-memory znodes and does not read znodes which from flash.
void ubifs_dump_leb | ( | const struct ubifs_info * | c, |
int | lnum | ||
) |
void ubifs_dump_lprop | ( | const struct ubifs_info * | c, |
const struct ubifs_lprops * | lp | ||
) |
void ubifs_dump_lprops | ( | struct ubifs_info * | c | ) |
void ubifs_dump_lpt_info | ( | struct ubifs_info * | c | ) |
void ubifs_dump_pnode | ( | struct ubifs_info * | c, |
struct ubifs_pnode * | pnode, | ||
struct ubifs_nnode * | parent, | ||
int | iip | ||
) |
void ubifs_dump_sleb | ( | const struct ubifs_info * | c, |
const struct ubifs_scan_leb * | sleb, | ||
int | offs | ||
) |
void ubifs_dump_tnc | ( | struct ubifs_info * | c | ) |
void ubifs_dump_znode | ( | const struct ubifs_info * | c, |
const struct ubifs_znode * | znode | ||
) |
struct ubifs_global_debug_info ubifs_dbg |