Lines Matching refs:lnum

30 	int lnum;  member
109 data->lnum = lprops->lnum; in scan_for_dirty_cb()
167 data.lnum = -1; in scan_for_dirty()
174 ubifs_assert(c, data.lnum >= c->main_first && data.lnum < c->leb_cnt); in scan_for_dirty()
175 c->lscan_lnum = data.lnum; in scan_for_dirty()
176 lprops = ubifs_lpt_lookup_dirty(c, data.lnum); in scan_for_dirty()
179 ubifs_assert(c, lprops->lnum == data.lnum); in scan_for_dirty()
322 lp->lnum, lp->free, lp->dirty, lp->flags); in ubifs_find_dirty_leb()
380 data->lnum = lprops->lnum; in scan_for_free_cb()
447 data.lnum = -1; in do_find_free_space()
453 ubifs_assert(c, data.lnum >= c->main_first && data.lnum < c->leb_cnt); in do_find_free_space()
454 c->lscan_lnum = data.lnum; in do_find_free_space()
455 lprops = ubifs_lpt_lookup_dirty(c, data.lnum); in do_find_free_space()
458 ubifs_assert(c, lprops->lnum == data.lnum); in do_find_free_space()
485 int lebs, rsvd_idx_lebs, pick_free = 0, err, lnum, flags; in ubifs_find_free_space() local
534 lnum = lprops->lnum; in ubifs_find_free_space()
559 err = ubifs_leb_unmap(c, lnum); in ubifs_find_free_space()
564 dbg_find("found LEB %d, free %d", lnum, c->leb_size - *offs); in ubifs_find_free_space()
566 return lnum; in ubifs_find_free_space()
613 data->lnum = lprops->lnum; in scan_for_idx_cb()
627 data.lnum = -1; in scan_for_leb_for_idx()
633 ubifs_assert(c, data.lnum >= c->main_first && data.lnum < c->leb_cnt); in scan_for_leb_for_idx()
634 c->lscan_lnum = data.lnum; in scan_for_leb_for_idx()
635 lprops = ubifs_lpt_lookup_dirty(c, data.lnum); in scan_for_leb_for_idx()
638 ubifs_assert(c, lprops->lnum == data.lnum); in scan_for_leb_for_idx()
664 int lnum = -1, err, flags; in ubifs_find_free_leb_for_idx() local
696 lnum = lprops->lnum; in ubifs_find_free_leb_for_idx()
699 lnum, lprops->free, lprops->dirty, lprops->flags); in ubifs_find_free_leb_for_idx()
715 err = ubifs_leb_unmap(c, lnum); in ubifs_find_free_leb_for_idx()
717 ubifs_change_one_lp(c, lnum, LPROPS_NC, LPROPS_NC, 0, in ubifs_find_free_leb_for_idx()
722 return lnum; in ubifs_find_free_leb_for_idx()
761 c->dirty_idx.arr[c->dirty_idx.cnt - 1]->lnum, in ubifs_save_dirty_idx_lnums()
766 c->dirty_idx.arr[i] = (void *)(size_t)c->dirty_idx.arr[i]->lnum; in ubifs_save_dirty_idx_lnums()
802 data->lnum = lprops->lnum; in scan_dirty_idx_cb()
824 data.lnum = -1; in find_dirty_idx_leb()
851 ubifs_assert(c, data.lnum >= c->main_first && data.lnum < c->leb_cnt); in find_dirty_idx_leb()
852 c->lscan_lnum = data.lnum; in find_dirty_idx_leb()
853 lprops = ubifs_lpt_lookup_dirty(c, data.lnum); in find_dirty_idx_leb()
856 ubifs_assert(c, lprops->lnum == data.lnum); in find_dirty_idx_leb()
862 lprops->lnum, lprops->free, lprops->dirty, lprops->flags); in find_dirty_idx_leb()
869 return lprops->lnum; in find_dirty_idx_leb()
879 int err, lnum; in get_idx_gc_leb() local
884 lnum = err; in get_idx_gc_leb()
889 lp = ubifs_lpt_lookup_dirty(c, lnum); in get_idx_gc_leb()
897 lp->lnum, lp->dirty, lp->free, lp->flags); in get_idx_gc_leb()
898 return lnum; in get_idx_gc_leb()
908 int lnum; in find_dirtiest_idx_leb() local
914 lnum = (size_t)c->dirty_idx.arr[--c->dirty_idx.cnt]; in find_dirtiest_idx_leb()
915 lp = ubifs_lpt_lookup(c, lnum); in find_dirtiest_idx_leb()
926 dbg_find("LEB %d, dirty %d and free %d flags %#x", lp->lnum, lp->dirty, in find_dirtiest_idx_leb()
930 return lnum; in find_dirtiest_idx_leb()