|
#define | UBIFS_DFS_DIR_NAME "ubi%d_%d" |
|
#define | UBIFS_DFS_DIR_LEN (3 + 1 + 2*2 + 1) |
|
#define | ubifs_assert(expr) |
|
#define | ubifs_assert_cmt_locked(c) |
|
#define | ubifs_dbg_msg(type, fmt,...) |
|
#define | DBG_KEY_BUF_LEN 48 |
|
#define | ubifs_dbg_msg_key(type, key, fmt,...) |
|
#define | dbg_gen(fmt,...) ubifs_dbg_msg("gen", fmt, ##__VA_ARGS__) |
|
#define | dbg_jnl(fmt,...) ubifs_dbg_msg("jnl", fmt, ##__VA_ARGS__) |
|
#define | dbg_jnlk(key, fmt,...) ubifs_dbg_msg_key("jnl", key, fmt, ##__VA_ARGS__) |
|
#define | dbg_tnc(fmt,...) ubifs_dbg_msg("tnc", fmt, ##__VA_ARGS__) |
|
#define | dbg_tnck(key, fmt,...) ubifs_dbg_msg_key("tnc", key, fmt, ##__VA_ARGS__) |
|
#define | dbg_lp(fmt,...) ubifs_dbg_msg("lp", fmt, ##__VA_ARGS__) |
|
#define | dbg_find(fmt,...) ubifs_dbg_msg("find", fmt, ##__VA_ARGS__) |
|
#define | dbg_mnt(fmt,...) ubifs_dbg_msg("mnt", fmt, ##__VA_ARGS__) |
|
#define | dbg_mntk(key, fmt,...) ubifs_dbg_msg_key("mnt", key, fmt, ##__VA_ARGS__) |
|
#define | dbg_io(fmt,...) ubifs_dbg_msg("io", fmt, ##__VA_ARGS__) |
|
#define | dbg_cmt(fmt,...) ubifs_dbg_msg("cmt", fmt, ##__VA_ARGS__) |
|
#define | dbg_budg(fmt,...) ubifs_dbg_msg("budg", fmt, ##__VA_ARGS__) |
|
#define | dbg_log(fmt,...) ubifs_dbg_msg("log", fmt, ##__VA_ARGS__) |
|
#define | dbg_gc(fmt,...) ubifs_dbg_msg("gc", fmt, ##__VA_ARGS__) |
|
#define | dbg_scan(fmt,...) ubifs_dbg_msg("scan", fmt, ##__VA_ARGS__) |
|
#define | dbg_rcvry(fmt,...) ubifs_dbg_msg("rcvry", fmt, ##__VA_ARGS__) |
|
|
int | ubifs_debugging_init (struct ubifs_info *c) |
|
void | ubifs_debugging_exit (struct ubifs_info *c) |
|
const char * | dbg_ntype (int type) |
|
const char * | dbg_cstate (int cmt_state) |
|
const char * | dbg_jhead (int jhead) |
|
const char * | dbg_get_key_dump (const struct ubifs_info *c, const union ubifs_key *key) |
|
const char * | dbg_snprintf_key (const struct ubifs_info *c, const union ubifs_key *key, char *buffer, int len) |
|
void | ubifs_dump_inode (struct ubifs_info *c, const struct inode *inode) |
|
void | ubifs_dump_node (const struct ubifs_info *c, const void *node) |
|
void | ubifs_dump_budget_req (const struct ubifs_budget_req *req) |
|
void | ubifs_dump_lstats (const struct ubifs_lp_stats *lst) |
|
void | ubifs_dump_budg (struct ubifs_info *c, const struct ubifs_budg_info *bi) |
|
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_leb (const struct ubifs_info *c, int lnum) |
|
void | ubifs_dump_sleb (const struct ubifs_info *c, const struct ubifs_scan_leb *sleb, int offs) |
|
void | ubifs_dump_znode (const struct ubifs_info *c, const struct ubifs_znode *znode) |
|
void | ubifs_dump_heap (struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat) |
|
void | ubifs_dump_pnode (struct ubifs_info *c, struct ubifs_pnode *pnode, struct ubifs_nnode *parent, int iip) |
|
void | ubifs_dump_tnc (struct ubifs_info *c) |
|
void | ubifs_dump_index (struct ubifs_info *c) |
|
void | ubifs_dump_lpt_lebs (const struct ubifs_info *c) |
|
int | dbg_walk_index (struct ubifs_info *c, dbg_leaf_callback leaf_cb, dbg_znode_callback znode_cb, void *priv) |
|
void | dbg_save_space_info (struct ubifs_info *c) |
|
int | dbg_check_space_info (struct ubifs_info *c) |
|
int | dbg_check_lprops (struct ubifs_info *c) |
|
int | dbg_old_index_check_init (struct ubifs_info *c, struct ubifs_zbranch *zroot) |
|
int | dbg_check_old_index (struct ubifs_info *c, struct ubifs_zbranch *zroot) |
|
int | dbg_check_cats (struct ubifs_info *c) |
|
int | dbg_check_ltab (struct ubifs_info *c) |
|
int | dbg_chk_lpt_free_spc (struct ubifs_info *c) |
|
int | dbg_chk_lpt_sz (struct ubifs_info *c, int action, int len) |
|
int | dbg_check_synced_i_size (const struct ubifs_info *c, struct inode *inode) |
|
int | dbg_check_dir (struct ubifs_info *c, const struct inode *dir) |
|
int | dbg_check_tnc (struct ubifs_info *c, int extra) |
|
int | dbg_check_idx_size (struct ubifs_info *c, long long idx_size) |
|
int | dbg_check_filesystem (struct ubifs_info *c) |
|
void | dbg_check_heap (struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat, int add_pos) |
|
int | dbg_check_lpt_nodes (struct ubifs_info *c, struct ubifs_cnode *cnode, int row, int col) |
|
int | dbg_check_inode_size (struct ubifs_info *c, const struct inode *inode, loff_t size) |
|
int | dbg_check_data_nodes_order (struct ubifs_info *c, struct list_head *head) |
|
int | dbg_check_nondata_nodes_order (struct ubifs_info *c, struct list_head *head) |
|
int | dbg_leb_write (struct ubifs_info *c, int lnum, const void *buf, int offs, int len) |
|
int | dbg_leb_change (struct ubifs_info *c, int lnum, const void *buf, int len) |
|
int | dbg_leb_unmap (struct ubifs_info *c, int lnum) |
|
int | dbg_leb_map (struct ubifs_info *c, int lnum) |
|
int | dbg_debugfs_init (void) |
|
void | dbg_debugfs_exit (void) |
|
int | dbg_debugfs_init_fs (struct ubifs_info *c) |
|
void | dbg_debugfs_exit_fs (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.
Definition at line 2276 of file debug.c.
dbg_check_lprops - check all LEB properties.
: UBIFS file-system description object
This function checks all LEB properties and makes sure they are all correct. It returns zero if everything is fine, %-EINVAL if there is an inconsistency and other negative error codes in case of other errors. This function is called while the file system is locked (because of commit start), so no additional locking is required. Note that locking the LPT mutex would cause a circular lock dependency with the TNC mutex.
Definition at line 1266 of file lprops.c.
dbg_check_old_index - check the old copy of the index.
: UBIFS file-system description object : root of the new index
In order to be able to recover from an unclean unmount, a complete copy of the index must exist on flash. This is the "old" index. The commit process must write the "new" index to flash without overwriting or destroying any part of the old index. This function is run at commit end in order to check that the old index does indeed exist completely intact.
This function returns %0 on success and a negative error code on failure.
Definition at line 569 of file commit.c.
dbg_chk_lpt_sz - check LPT does not write more than LPT size.
: the UBIFS file-system description object : what to do : length written
This function returns %0 on success and a negative error code on failure. The argument may be one of: o %0 - LPT debugging checking starts, initialize debugging variables; o %1 - wrote an LPT node, increase LPT size by bytes; o %2 - switched to a different LEB and wasted bytes; o %3 - check that we've written the right number of bytes. o %4 - wasted bytes;
Definition at line 1786 of file lpt_commit.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.
Definition at line 2825 of file debug.c.
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.
Definition at line 1561 of file debug.c.