Lines Matching refs:lnum
33 * @lnum: logical eraseblock number of the node
49 int lnum;
97 lp = ubifs_lpt_lookup_dirty(c, b->bud->lnum);
124 dbg_mnt("bud LEB %d was GC'd (%d free, %d dirty)", b->bud->lnum,
126 dbg_gc("bud LEB %d was GC'd (%d free, %d dirty)", b->bud->lnum,
138 b->bud->lnum, lp->free, lp->dirty, b->free,
150 b->bud->lnum, c->leb_size - b->free);
217 r->lnum, r->offs, r->len, r->deletion, r->sqnum);
226 err = ubifs_tnc_add_nm(c, &r->key, r->lnum, r->offs,
246 err = ubifs_tnc_add(c, &r->key, r->lnum, r->offs,
332 * @lnum: node logical eraseblock number
349 static int insert_node(struct ubifs_info *c, int lnum, int offs, int len,
356 dbg_mntk(key, "add LEB %d:%d, key ", lnum, offs);
367 r->lnum = lnum;
383 * @lnum: node logical eraseblock number
397 static int insert_dent(struct ubifs_info *c, int lnum, int offs, int len,
404 dbg_mntk(key, "add LEB %d:%d, key ", lnum, offs);
420 r->lnum = lnum;
518 err = ubifs_leb_read(c, next->lnum, (char *)&data, next->start, 4, 1);
537 int err = 0, used = 0, lnum = b->bud->lnum, offs = b->bud->start;
542 lnum, b->bud->jhead, offs, is_last);
551 sleb = ubifs_recover_leb(c, lnum, offs, c->sbuf, b->bud->jhead);
553 sleb = ubifs_scan(c, lnum, offs, c->sbuf, 0);
559 * the 'lnum' LEB may contain previously committed data. One of the
568 * sleb->endpt', and the space in the 'lnum' LEB between 'offs' and
600 err = insert_node(c, lnum, snod->offs, snod->len,
612 err = insert_node(c, lnum, snod->offs, snod->len,
626 err = insert_dent(c, lnum, snod->offs, snod->len,
652 err = insert_node(c, lnum, snod->offs, snod->len,
659 snod->type, lnum, snod->offs);
667 ubifs_assert(ubifs_search_bud(c, lnum));
674 lnum, b->dirty, b->free);
681 ubifs_err(c, "bad node is at LEB %d:%d", lnum, snod->offs);
730 * @lnum: bud logical eraseblock number to replay
738 static int add_replay_bud(struct ubifs_info *c, int lnum, int offs, int jhead,
744 dbg_mnt("add replay bud LEB %d:%d, head %d", lnum, offs, jhead);
756 bud->lnum = lnum;
782 int lnum = le32_to_cpu(ref->lnum);
791 if (jhead >= c->jhead_cnt || lnum >= c->leb_cnt ||
792 lnum < c->main_first || offs > c->leb_size ||
797 bud = ubifs_search_bud(c, lnum);
801 ubifs_err(c, "bud at LEB %d:%d was already referred", lnum, offs);
811 * @lnum: log logical eraseblock to replay
819 static int replay_log_leb(struct ubifs_info *c, int lnum, int offs, void *sbuf)
826 dbg_mnt("replay log LEB %d:%d", lnum, offs);
827 sleb = ubifs_scan(c, lnum, offs, sbuf, c->need_recovery);
836 sleb = ubifs_recover_log_leb(c, lnum, offs, sbuf);
858 lnum, offs);
863 lnum, offs,
918 err = add_replay_bud(c, le32_to_cpu(ref->lnum),
941 c->lhead_lnum = lnum;
952 lnum, offs + snod->offs);
1003 int err, lnum, free;
1020 lnum = c->ltail_lnum = c->lhead_lnum;
1023 err = replay_log_leb(c, lnum, 0, c->sbuf);
1025 if (lnum != c->lhead_lnum)
1037 lnum, 0);
1042 lnum = ubifs_next_log_lnum(c, lnum);
1043 } while (lnum != c->ltail_lnum);