Lines Matching refs:d
970 struct ubifs_debug_info *d = c->dbg; in dbg_save_space_info() local
974 memcpy(&d->saved_lst, &c->lst, sizeof(struct ubifs_lp_stats)); in dbg_save_space_info()
975 memcpy(&d->saved_bi, &c->bi, sizeof(struct ubifs_budg_info)); in dbg_save_space_info()
976 d->saved_idx_gc_cnt = c->idx_gc_cnt; in dbg_save_space_info()
1004 d->saved_free = ubifs_get_free_space_nolock(c); in dbg_save_space_info()
1020 struct ubifs_debug_info *d = c->dbg; in dbg_check_space_info() local
1032 if (free != d->saved_free) { in dbg_check_space_info()
1034 d->saved_free, free); in dbg_check_space_info()
1042 ubifs_dump_lstats(&d->saved_lst); in dbg_check_space_info()
1044 ubifs_dump_budg(c, &d->saved_bi); in dbg_check_space_info()
1045 ubifs_msg(c, "saved idx_gc_cnt %d", d->saved_idx_gc_cnt); in dbg_check_space_info()
2456 struct ubifs_debug_info *d = c->dbg; in power_cut_emulated() local
2460 if (!d->pc_cnt) { in power_cut_emulated()
2466 d->pc_delay = 1; in power_cut_emulated()
2469 d->pc_timeout = jiffies; in power_cut_emulated()
2470 d->pc_timeout += msecs_to_jiffies(delay); in power_cut_emulated()
2473 d->pc_delay = 2; in power_cut_emulated()
2476 d->pc_cnt_max = delay; in power_cut_emulated()
2481 d->pc_cnt += 1; in power_cut_emulated()
2485 if (d->pc_delay == 1 && time_before(jiffies, d->pc_timeout)) in power_cut_emulated()
2487 if (d->pc_delay == 2 && d->pc_cnt++ < d->pc_cnt_max) in power_cut_emulated()
2542 d->pc_happened = 1; in power_cut_emulated()
2684 struct ubifs_debug_info *d = c->dbg; in dfs_file_read() local
2687 if (dent == d->dfs_chk_gen) in dfs_file_read()
2688 val = d->chk_gen; in dfs_file_read()
2689 else if (dent == d->dfs_chk_index) in dfs_file_read()
2690 val = d->chk_index; in dfs_file_read()
2691 else if (dent == d->dfs_chk_orph) in dfs_file_read()
2692 val = d->chk_orph; in dfs_file_read()
2693 else if (dent == d->dfs_chk_lprops) in dfs_file_read()
2694 val = d->chk_lprops; in dfs_file_read()
2695 else if (dent == d->dfs_chk_fs) in dfs_file_read()
2696 val = d->chk_fs; in dfs_file_read()
2697 else if (dent == d->dfs_tst_rcvry) in dfs_file_read()
2698 val = d->tst_rcvry; in dfs_file_read()
2699 else if (dent == d->dfs_ro_error) in dfs_file_read()
2737 struct ubifs_debug_info *d = c->dbg; in dfs_file_write() local
2741 if (file->f_path.dentry == d->dfs_dump_lprops) { in dfs_file_write()
2745 if (file->f_path.dentry == d->dfs_dump_budg) { in dfs_file_write()
2749 if (file->f_path.dentry == d->dfs_dump_tnc) { in dfs_file_write()
2760 if (dent == d->dfs_chk_gen) in dfs_file_write()
2761 d->chk_gen = val; in dfs_file_write()
2762 else if (dent == d->dfs_chk_index) in dfs_file_write()
2763 d->chk_index = val; in dfs_file_write()
2764 else if (dent == d->dfs_chk_orph) in dfs_file_write()
2765 d->chk_orph = val; in dfs_file_write()
2766 else if (dent == d->dfs_chk_lprops) in dfs_file_write()
2767 d->chk_lprops = val; in dfs_file_write()
2768 else if (dent == d->dfs_chk_fs) in dfs_file_write()
2769 d->chk_fs = val; in dfs_file_write()
2770 else if (dent == d->dfs_tst_rcvry) in dfs_file_write()
2771 d->tst_rcvry = val; in dfs_file_write()
2772 else if (dent == d->dfs_ro_error) in dfs_file_write()
2803 struct ubifs_debug_info *d = c->dbg; in dbg_debugfs_init_fs() local
2805 n = snprintf(d->dfs_dir_name, UBIFS_DFS_DIR_LEN + 1, UBIFS_DFS_DIR_NAME, in dbg_debugfs_init_fs()
2812 fname = d->dfs_dir_name; in dbg_debugfs_init_fs()
2813 d->dfs_dir = debugfs_create_dir(fname, dfs_rootdir); in dbg_debugfs_init_fs()
2816 d->dfs_dump_lprops = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, in dbg_debugfs_init_fs()
2820 d->dfs_dump_budg = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, in dbg_debugfs_init_fs()
2824 d->dfs_dump_tnc = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, in dbg_debugfs_init_fs()
2828 d->dfs_chk_gen = debugfs_create_file(fname, S_IRUSR | S_IWUSR, in dbg_debugfs_init_fs()
2829 d->dfs_dir, c, &dfs_fops); in dbg_debugfs_init_fs()
2832 d->dfs_chk_index = debugfs_create_file(fname, S_IRUSR | S_IWUSR, in dbg_debugfs_init_fs()
2833 d->dfs_dir, c, &dfs_fops); in dbg_debugfs_init_fs()
2836 d->dfs_chk_orph = debugfs_create_file(fname, S_IRUSR | S_IWUSR, in dbg_debugfs_init_fs()
2837 d->dfs_dir, c, &dfs_fops); in dbg_debugfs_init_fs()
2840 d->dfs_chk_lprops = debugfs_create_file(fname, S_IRUSR | S_IWUSR, in dbg_debugfs_init_fs()
2841 d->dfs_dir, c, &dfs_fops); in dbg_debugfs_init_fs()
2844 d->dfs_chk_fs = debugfs_create_file(fname, S_IRUSR | S_IWUSR, in dbg_debugfs_init_fs()
2845 d->dfs_dir, c, &dfs_fops); in dbg_debugfs_init_fs()
2848 d->dfs_tst_rcvry = debugfs_create_file(fname, S_IRUSR | S_IWUSR, in dbg_debugfs_init_fs()
2849 d->dfs_dir, c, &dfs_fops); in dbg_debugfs_init_fs()
2852 d->dfs_ro_error = debugfs_create_file(fname, S_IRUSR | S_IWUSR, in dbg_debugfs_init_fs()
2853 d->dfs_dir, c, &dfs_fops); in dbg_debugfs_init_fs()