Lines Matching defs:lnum
30 * @lnum: logical eraseblock number of the node
46 int lnum;
95 lp = ubifs_lpt_lookup_dirty(c, b->bud->lnum);
122 dbg_mnt("bud LEB %d was GC'd (%d free, %d dirty)", b->bud->lnum,
124 dbg_gc("bud LEB %d was GC'd (%d free, %d dirty)", b->bud->lnum,
136 b->bud->lnum, lp->free, lp->dirty, b->free,
148 b->bud->lnum, c->leb_size - b->free);
248 r->lnum, r->offs, r->len, r->deletion, r->sqnum);
254 err = ubifs_tnc_add_nm(c, &r->key, r->lnum, r->offs,
279 err = ubifs_tnc_add(c, &r->key, r->lnum, r->offs,
366 * @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
432 static int insert_dent(struct ubifs_info *c, int lnum, int offs, int len,
440 dbg_mntk(key, "add LEB %d:%d, key ", lnum, offs);
456 r->lnum = lnum;
555 err = ubifs_leb_read(c, next->lnum, (char *)&data, next->start, 4, 1);
643 n_not_auth, sleb->lnum);
647 n_not_auth, sleb->lnum);
669 int err = 0, used = 0, lnum = b->bud->lnum, offs = b->bud->start;
675 lnum, b->bud->jhead, offs, is_last);
684 sleb = ubifs_recover_leb(c, lnum, offs, c->sbuf, b->bud->jhead);
686 sleb = ubifs_scan(c, lnum, offs, c->sbuf, 0);
701 * the 'lnum' LEB may contain previously committed data. One of the
710 * sleb->endpt', and the space in the 'lnum' LEB between 'offs' and
745 err = insert_node(c, lnum, snod->offs, snod->len, hash,
757 err = insert_node(c, lnum, snod->offs, snod->len, hash,
771 err = insert_dent(c, lnum, snod->offs, snod->len, hash,
797 err = insert_node(c, lnum, snod->offs, snod->len, hash,
806 snod->type, lnum, snod->offs);
818 ubifs_assert(c, ubifs_search_bud(c, lnum));
825 lnum, b->dirty, b->free);
832 ubifs_err(c, "bad node is at LEB %d:%d", lnum, snod->offs);
881 * @lnum: bud logical eraseblock number to replay
889 static int add_replay_bud(struct ubifs_info *c, int lnum, int offs, int jhead,
896 dbg_mnt("add replay bud LEB %d:%d, head %d", lnum, offs, jhead);
908 bud->lnum = lnum;
945 int lnum = le32_to_cpu(ref->lnum);
954 if (jhead >= c->jhead_cnt || lnum >= c->leb_cnt ||
955 lnum < c->main_first || offs > c->leb_size ||
960 bud = ubifs_search_bud(c, lnum);
964 ubifs_err(c, "bud at LEB %d:%d was already referred", lnum, offs);
974 * @lnum: log logical eraseblock to replay
982 static int replay_log_leb(struct ubifs_info *c, int lnum, int offs, void *sbuf)
989 dbg_mnt("replay log LEB %d:%d", lnum, offs);
990 sleb = ubifs_scan(c, lnum, offs, sbuf, c->need_recovery);
999 sleb = ubifs_recover_log_leb(c, lnum, offs, sbuf);
1021 lnum, offs);
1026 lnum, offs,
1094 err = add_replay_bud(c, le32_to_cpu(ref->lnum),
1117 c->lhead_lnum = lnum;
1128 lnum, offs + snod->offs);
1179 int err, lnum, free;
1196 lnum = c->ltail_lnum = c->lhead_lnum;
1199 err = replay_log_leb(c, lnum, 0, c->sbuf);
1201 if (lnum != c->lhead_lnum)
1213 lnum, 0);
1218 lnum = ubifs_next_log_lnum(c, lnum);
1219 } while (lnum != c->ltail_lnum);