Lines Matching refs:lp
188 struct ubifs_lprops *lp; in add_to_lpt_heap() local
190 lp = heap->arr[cpos]; in add_to_lpt_heap()
191 lp->flags &= ~LPROPS_CAT_MASK; in add_to_lpt_heap()
192 lp->flags |= LPROPS_UNCAT; in add_to_lpt_heap()
193 list_add(&lp->list, &c->uncat_list); in add_to_lpt_heap()
526 const struct ubifs_lprops *lp, in ubifs_change_lp() argument
534 struct ubifs_lprops *lprops = (struct ubifs_lprops *)lp; in ubifs_change_lp()
658 const struct ubifs_lprops *lp; in ubifs_change_one_lp() local
662 lp = ubifs_lpt_lookup_dirty(c, lnum); in ubifs_change_one_lp()
663 if (IS_ERR(lp)) { in ubifs_change_one_lp()
664 err = PTR_ERR(lp); in ubifs_change_one_lp()
668 flags = (lp->flags | flags_set) & ~flags_clean; in ubifs_change_one_lp()
669 lp = ubifs_change_lp(c, lp, free, dirty, flags, idx_gc_cnt); in ubifs_change_one_lp()
670 if (IS_ERR(lp)) in ubifs_change_one_lp()
671 err = PTR_ERR(lp); in ubifs_change_one_lp()
697 const struct ubifs_lprops *lp; in ubifs_update_one_lp() local
701 lp = ubifs_lpt_lookup_dirty(c, lnum); in ubifs_update_one_lp()
702 if (IS_ERR(lp)) { in ubifs_update_one_lp()
703 err = PTR_ERR(lp); in ubifs_update_one_lp()
707 flags = (lp->flags | flags_set) & ~flags_clean; in ubifs_update_one_lp()
708 lp = ubifs_change_lp(c, lp, free, lp->dirty + dirty, flags, 0); in ubifs_update_one_lp()
709 if (IS_ERR(lp)) in ubifs_update_one_lp()
710 err = PTR_ERR(lp); in ubifs_update_one_lp()
730 int ubifs_read_one_lp(struct ubifs_info *c, int lnum, struct ubifs_lprops *lp) in ubifs_read_one_lp() argument
745 memcpy(lp, lpp, sizeof(struct ubifs_lprops)); in ubifs_read_one_lp()
965 struct ubifs_lprops *lp; in dbg_check_heap() local
976 lp = ubifs_lpt_lookup(c, lprops->lnum); in dbg_check_heap()
977 if (IS_ERR(lp)) { in dbg_check_heap()
981 if (lprops != lp) { in dbg_check_heap()
983 (size_t)lprops, (size_t)lp, lprops->lnum, in dbg_check_heap()
984 lp->lnum); in dbg_check_heap()
989 lp = heap->arr[j]; in dbg_check_heap()
990 if (lp == lprops) { in dbg_check_heap()
994 if (lp->lnum == lprops->lnum) { in dbg_check_heap()
1021 const struct ubifs_lprops *lp, int in_tree, in scan_check_cb() argument
1026 int cat, lnum = lp->lnum, is_idx = 0, used = 0, free, dirty, ret; in scan_check_cb()
1029 cat = lp->flags & LPROPS_CAT_MASK; in scan_check_cb()
1031 cat = ubifs_categorize_lprops(c, lp); in scan_check_cb()
1032 if (cat != (lp->flags & LPROPS_CAT_MASK)) { in scan_check_cb()
1034 (lp->flags & LPROPS_CAT_MASK), cat); in scan_check_cb()
1062 if (lprops == lp) { in scan_check_cb()
1078 if ((lp->hpos != -1 && heap->arr[lp->hpos]->lnum != lnum) || in scan_check_cb()
1079 lp != heap->arr[lp->hpos]) { in scan_check_cb()
1093 if (lp->free == c->leb_size) { in scan_check_cb()
1099 if (lp->free + lp->dirty == c->leb_size && in scan_check_cb()
1100 !(lp->flags & LPROPS_INDEX)) { in scan_check_cb()
1101 lst->total_free += lp->free; in scan_check_cb()
1102 lst->total_dirty += lp->dirty; in scan_check_cb()
1158 if (lp->free + lp->dirty == c->leb_size && in scan_check_cb()
1160 if ((is_idx && !(lp->flags & LPROPS_INDEX)) || in scan_check_cb()
1162 lp->free == c->leb_size) { in scan_check_cb()
1170 free = lp->free; in scan_check_cb()
1171 dirty = lp->dirty; in scan_check_cb()
1175 if (is_idx && lp->free + lp->dirty == free + dirty && in scan_check_cb()
1188 free = lp->free; in scan_check_cb()
1189 dirty = lp->dirty; in scan_check_cb()
1192 if (lp->free != free || lp->dirty != dirty) in scan_check_cb()
1195 if (is_idx && !(lp->flags & LPROPS_INDEX)) { in scan_check_cb()
1205 if (!is_idx && (lp->flags & LPROPS_INDEX)) { in scan_check_cb()
1216 if (!(lp->flags & LPROPS_INDEX)) in scan_check_cb()
1221 if (!(lp->flags & LPROPS_INDEX)) { in scan_check_cb()
1236 lnum, lp->free, lp->dirty, lp->flags, free, dirty); in scan_check_cb()