Lines Matching refs:lnum

29  * @lnum: logical eraseblock number of the node
45 int lnum;
94 lp = ubifs_lpt_lookup_dirty(c, b->bud->lnum);
121 dbg_mnt("bud LEB %d was GC'd (%d free, %d dirty)", b->bud->lnum,
123 dbg_gc("bud LEB %d was GC'd (%d free, %d dirty)", b->bud->lnum,
135 b->bud->lnum, lp->free, lp->dirty, b->free,
147 b->bud->lnum, c->leb_size - b->free);
247 r->lnum, r->offs, r->len, r->deletion, r->sqnum);
253 err = ubifs_tnc_add_nm(c, &r->key, r->lnum, r->offs,
278 err = ubifs_tnc_add(c, &r->key, r->lnum, r->offs,
365 * @lnum: node logical eraseblock number
383 static int insert_node(struct ubifs_info *c, int lnum, int offs, int len,
390 dbg_mntk(key, "add LEB %d:%d, key ", lnum, offs);
401 r->lnum = lnum;
418 * @lnum: node logical eraseblock number
433 static int insert_dent(struct ubifs_info *c, int lnum, int offs, int len,
441 dbg_mntk(key, "add LEB %d:%d, key ", lnum, offs);
457 r->lnum = lnum;
556 err = ubifs_leb_read(c, next->lnum, (char *)&data, next->start, 4, 1);
644 n_not_auth, sleb->lnum);
648 n_not_auth, sleb->lnum);
670 int err = 0, used = 0, lnum = b->bud->lnum, offs = b->bud->start;
676 lnum, b->bud->jhead, offs, is_last);
685 sleb = ubifs_recover_leb(c, lnum, offs, c->sbuf, b->bud->jhead);
687 sleb = ubifs_scan(c, lnum, offs, c->sbuf, 0);
702 * the 'lnum' LEB may contain previously committed data. One of the
711 * sleb->endpt', and the space in the 'lnum' LEB between 'offs' and
746 err = insert_node(c, lnum, snod->offs, snod->len, hash,
758 err = insert_node(c, lnum, snod->offs, snod->len, hash,
772 err = insert_dent(c, lnum, snod->offs, snod->len, hash,
798 err = insert_node(c, lnum, snod->offs, snod->len, hash,
807 snod->type, lnum, snod->offs);
819 ubifs_assert(c, ubifs_search_bud(c, lnum));
826 lnum, b->dirty, b->free);
833 ubifs_err(c, "bad node is at LEB %d:%d", lnum, snod->offs);
882 * @lnum: bud logical eraseblock number to replay
890 static int add_replay_bud(struct ubifs_info *c, int lnum, int offs, int jhead,
897 dbg_mnt("add replay bud LEB %d:%d, head %d", lnum, offs, jhead);
909 bud->lnum = lnum;
946 int lnum = le32_to_cpu(ref->lnum);
955 if (jhead >= c->jhead_cnt || lnum >= c->leb_cnt ||
956 lnum < c->main_first || offs > c->leb_size ||
961 bud = ubifs_search_bud(c, lnum);
965 ubifs_err(c, "bud at LEB %d:%d was already referred", lnum, offs);
975 * @lnum: log logical eraseblock to replay
983 static int replay_log_leb(struct ubifs_info *c, int lnum, int offs, void *sbuf)
990 dbg_mnt("replay log LEB %d:%d", lnum, offs);
991 sleb = ubifs_scan(c, lnum, offs, sbuf, c->need_recovery);
1000 sleb = ubifs_recover_log_leb(c, lnum, offs, sbuf);
1022 lnum, offs);
1027 lnum, offs,
1095 err = add_replay_bud(c, le32_to_cpu(ref->lnum),
1118 c->lhead_lnum = lnum;
1129 lnum, offs + snod->offs);
1180 int err, lnum, free;
1197 lnum = c->ltail_lnum = c->lhead_lnum;
1200 err = replay_log_leb(c, lnum, 0, c->sbuf);
1202 if (lnum != c->lhead_lnum)
1214 lnum, 0);
1219 lnum = ubifs_next_log_lnum(c, lnum);
1220 } while (lnum != c->ltail_lnum);