Lines Matching refs:lnum

46 	int lnum;  member
95 lp = ubifs_lpt_lookup_dirty(c, b->bud->lnum); in set_bud_lprops()
122 dbg_mnt("bud LEB %d was GC'd (%d free, %d dirty)", b->bud->lnum, in set_bud_lprops()
124 dbg_gc("bud LEB %d was GC'd (%d free, %d dirty)", b->bud->lnum, in set_bud_lprops()
136 b->bud->lnum, lp->free, lp->dirty, b->free, in set_bud_lprops()
148 b->bud->lnum, c->leb_size - b->free); in set_bud_lprops()
247 r->lnum, r->offs, r->len, r->deletion, r->sqnum); in apply_replay_entry()
253 err = ubifs_tnc_add_nm(c, &r->key, r->lnum, r->offs, in apply_replay_entry()
278 err = ubifs_tnc_add(c, &r->key, r->lnum, r->offs, in apply_replay_entry()
382 static int insert_node(struct ubifs_info *c, int lnum, int offs, int len, in insert_node() argument
389 dbg_mntk(key, "add LEB %d:%d, key ", lnum, offs); in insert_node()
400 r->lnum = lnum; in insert_node()
431 static int insert_dent(struct ubifs_info *c, int lnum, int offs, int len, in insert_dent() argument
439 dbg_mntk(key, "add LEB %d:%d, key ", lnum, offs); in insert_dent()
455 r->lnum = lnum; in insert_dent()
554 err = ubifs_leb_read(c, next->lnum, (char *)&data, next->start, 4, 1); in is_last_bud()
640 n_not_auth, sleb->lnum); in authenticate_sleb()
644 n_not_auth, sleb->lnum); in authenticate_sleb()
666 int err = 0, used = 0, lnum = b->bud->lnum, offs = b->bud->start; in replay_bud() local
672 lnum, b->bud->jhead, offs, is_last); in replay_bud()
681 sleb = ubifs_recover_leb(c, lnum, offs, c->sbuf, b->bud->jhead); in replay_bud()
683 sleb = ubifs_scan(c, lnum, offs, c->sbuf, 0); in replay_bud()
742 err = insert_node(c, lnum, snod->offs, snod->len, hash, in replay_bud()
754 err = insert_node(c, lnum, snod->offs, snod->len, hash, in replay_bud()
768 err = insert_dent(c, lnum, snod->offs, snod->len, hash, in replay_bud()
794 err = insert_node(c, lnum, snod->offs, snod->len, hash, in replay_bud()
803 snod->type, lnum, snod->offs); in replay_bud()
815 ubifs_assert(c, ubifs_search_bud(c, lnum)); in replay_bud()
822 lnum, b->dirty, b->free); in replay_bud()
829 ubifs_err(c, "bad node is at LEB %d:%d", lnum, snod->offs); in replay_bud()
886 static int add_replay_bud(struct ubifs_info *c, int lnum, int offs, int jhead, in add_replay_bud() argument
893 dbg_mnt("add replay bud LEB %d:%d, head %d", lnum, offs, jhead); in add_replay_bud()
905 bud->lnum = lnum; in add_replay_bud()
942 int lnum = le32_to_cpu(ref->lnum); in validate_ref() local
951 if (jhead >= c->jhead_cnt || lnum >= c->leb_cnt || in validate_ref()
952 lnum < c->main_first || offs > c->leb_size || in validate_ref()
957 bud = ubifs_search_bud(c, lnum); in validate_ref()
961 ubifs_err(c, "bud at LEB %d:%d was already referred", lnum, offs); in validate_ref()
979 static int replay_log_leb(struct ubifs_info *c, int lnum, int offs, void *sbuf) in replay_log_leb() argument
986 dbg_mnt("replay log LEB %d:%d", lnum, offs); in replay_log_leb()
987 sleb = ubifs_scan(c, lnum, offs, sbuf, c->need_recovery); in replay_log_leb()
996 sleb = ubifs_recover_log_leb(c, lnum, offs, sbuf); in replay_log_leb()
1018 lnum, offs); in replay_log_leb()
1023 lnum, offs, in replay_log_leb()
1091 err = add_replay_bud(c, le32_to_cpu(ref->lnum), in replay_log_leb()
1114 c->lhead_lnum = lnum; in replay_log_leb()
1125 lnum, offs + snod->offs); in replay_log_leb()
1176 int err, lnum, free; in ubifs_replay_journal() local
1193 lnum = c->ltail_lnum = c->lhead_lnum; in ubifs_replay_journal()
1196 err = replay_log_leb(c, lnum, 0, c->sbuf); in ubifs_replay_journal()
1198 if (lnum != c->lhead_lnum) in ubifs_replay_journal()
1210 lnum, 0); in ubifs_replay_journal()
1215 lnum = ubifs_next_log_lnum(c, lnum); in ubifs_replay_journal()
1216 } while (lnum != c->ltail_lnum); in ubifs_replay_journal()