Lines Matching refs:lnum
30 struct ubifs_bud *ubifs_search_bud(struct ubifs_info *c, int lnum) in ubifs_search_bud() argument
39 if (lnum < bud->lnum) in ubifs_search_bud()
41 else if (lnum > bud->lnum) in ubifs_search_bud()
59 struct ubifs_wbuf *ubifs_get_wbuf(struct ubifs_info *c, int lnum) in ubifs_get_wbuf() argument
72 if (lnum < bud->lnum) in ubifs_get_wbuf()
74 else if (lnum > bud->lnum) in ubifs_get_wbuf()
123 ubifs_assert(c, bud->lnum != b->lnum); in ubifs_add_bud()
124 if (bud->lnum < b->lnum) in ubifs_add_bud()
146 dbg_log("LEB %d:%d, jhead %s, bud_bytes %lld", bud->lnum, in ubifs_add_bud()
164 int ubifs_add_bud_to_log(struct ubifs_info *c, int jhead, int lnum, int offs) in ubifs_add_bud_to_log() argument
224 bud->lnum = lnum; in ubifs_add_bud_to_log()
230 ref->lnum = cpu_to_le32(bud->lnum); in ubifs_add_bud_to_log()
255 err = ubifs_leb_map(c, bud->lnum); in ubifs_add_bud_to_log()
314 if (wbuf->lnum == bud->lnum) { in remove_buds()
321 bud->lnum, bud->start, dbg_jhead(bud->jhead), in remove_buds()
327 bud->lnum, bud->start, dbg_jhead(bud->jhead), in remove_buds()
394 int lnum = c->jheads[i].wbuf.lnum; in ubifs_log_start_commit() local
397 if (lnum == -1 || offs == c->leb_size) in ubifs_log_start_commit()
401 lnum, offs, dbg_jhead(i)); in ubifs_log_start_commit()
404 ref->lnum = cpu_to_le32(lnum); in ubifs_log_start_commit()
517 int lnum, err = 0; in ubifs_log_post_commit() local
523 err = ubifs_return_leb(c, bud->lnum); in ubifs_log_post_commit()
531 for (lnum = old_ltail_lnum; lnum != c->ltail_lnum; in ubifs_log_post_commit()
532 lnum = ubifs_next_log_lnum(c, lnum)) { in ubifs_log_post_commit()
533 dbg_log("unmap log LEB %d", lnum); in ubifs_log_post_commit()
534 err = ubifs_leb_unmap(c, lnum); in ubifs_log_post_commit()
550 int lnum; member
561 static int done_already(struct rb_root *done_tree, int lnum) in done_already() argument
569 if (lnum < dr->lnum) in done_already()
571 else if (lnum > dr->lnum) in done_already()
581 dr->lnum = lnum; in done_already()
611 static int add_node(struct ubifs_info *c, void *buf, int *lnum, int *offs, in add_node() argument
621 err = ubifs_leb_change(c, *lnum, buf, sz); in add_node()
624 *lnum = ubifs_next_log_lnum(c, *lnum); in add_node()
647 int lnum, err, first = 1, write_lnum, offs = 0; in ubifs_consolidate_log() local
655 lnum = c->ltail_lnum; in ubifs_consolidate_log()
656 write_lnum = lnum; in ubifs_consolidate_log()
658 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 0); in ubifs_consolidate_log()
667 int ref_lnum = le32_to_cpu(ref->lnum); in ubifs_consolidate_log()
692 if (lnum == c->lhead_lnum) in ubifs_consolidate_log()
694 lnum = ubifs_next_log_lnum(c, lnum); in ubifs_consolidate_log()
712 lnum = write_lnum; in ubifs_consolidate_log()
714 lnum = ubifs_next_log_lnum(c, lnum); in ubifs_consolidate_log()
715 err = ubifs_leb_unmap(c, lnum); in ubifs_consolidate_log()
718 } while (lnum != c->lhead_lnum); in ubifs_consolidate_log()