• Home
  • Raw
  • Download

Lines Matching refs:cat

29 static int get_heap_comp_val(struct ubifs_lprops *lprops, int cat)  in get_heap_comp_val()  argument
31 switch (cat) { in get_heap_comp_val()
54 struct ubifs_lprops *lprops, int cat) in move_up_lpt_heap() argument
61 val1 = get_heap_comp_val(lprops, cat); in move_up_lpt_heap()
66 val2 = get_heap_comp_val(heap->arr[ppos], cat); in move_up_lpt_heap()
91 struct ubifs_lprops *lprops, int hpos, int cat) in adjust_lpt_heap() argument
95 val1 = get_heap_comp_val(lprops, cat); in adjust_lpt_heap()
100 val2 = get_heap_comp_val(heap->arr[ppos], cat); in adjust_lpt_heap()
112 val2 = get_heap_comp_val(heap->arr[ppos], cat); in adjust_lpt_heap()
126 val2 = get_heap_comp_val(heap->arr[cpos], cat); in adjust_lpt_heap()
131 cat); in adjust_lpt_heap()
146 val3 = get_heap_comp_val(heap->arr[cpos], cat); in adjust_lpt_heap()
170 int cat) in add_to_lpt_heap() argument
172 struct ubifs_lpt_heap *heap = &c->lpt_heap[cat - 1]; in add_to_lpt_heap()
185 val1 = get_heap_comp_val(lprops, cat); in add_to_lpt_heap()
186 val2 = get_heap_comp_val(heap->arr[cpos], cat); in add_to_lpt_heap()
196 move_up_lpt_heap(c, heap, lprops, cat); in add_to_lpt_heap()
197 dbg_check_heap(c, heap, cat, lprops->hpos); in add_to_lpt_heap()
200 dbg_check_heap(c, heap, cat, -1); in add_to_lpt_heap()
205 move_up_lpt_heap(c, heap, lprops, cat); in add_to_lpt_heap()
206 dbg_check_heap(c, heap, cat, lprops->hpos); in add_to_lpt_heap()
218 struct ubifs_lprops *lprops, int cat) in remove_from_lpt_heap() argument
223 heap = &c->lpt_heap[cat - 1]; in remove_from_lpt_heap()
230 adjust_lpt_heap(c, heap, heap->arr[hpos], hpos, cat); in remove_from_lpt_heap()
232 dbg_check_heap(c, heap, cat, -1); in remove_from_lpt_heap()
249 struct ubifs_lprops *new_lprops, int cat) in lpt_heap_replace() argument
254 heap = &c->lpt_heap[cat - 1]; in lpt_heap_replace()
267 int cat) in ubifs_add_to_cat() argument
269 switch (cat) { in ubifs_add_to_cat()
273 if (add_to_lpt_heap(c, lprops, cat)) in ubifs_add_to_cat()
276 cat = LPROPS_UNCAT; in ubifs_add_to_cat()
296 lprops->flags |= cat; in ubifs_add_to_cat()
310 struct ubifs_lprops *lprops, int cat) in ubifs_remove_from_cat() argument
312 switch (cat) { in ubifs_remove_from_cat()
316 remove_from_lpt_heap(c, lprops, cat); in ubifs_remove_from_cat()
349 int cat; in ubifs_replace_cat() local
351 cat = new_lprops->flags & LPROPS_CAT_MASK; in ubifs_replace_cat()
352 switch (cat) { in ubifs_replace_cat()
356 lpt_heap_replace(c, old_lprops, new_lprops, cat); in ubifs_replace_cat()
380 int cat = lprops->flags & LPROPS_CAT_MASK; in ubifs_ensure_cat() local
382 if (cat != LPROPS_UNCAT) in ubifs_ensure_cat()
384 cat = ubifs_categorize_lprops(c, lprops); in ubifs_ensure_cat()
385 if (cat == LPROPS_UNCAT) in ubifs_ensure_cat()
388 ubifs_add_to_cat(c, lprops, cat); in ubifs_ensure_cat()
860 int i, cat; in dbg_check_cats() local
932 for (cat = 1; cat <= LPROPS_HEAP_CNT; cat++) { in dbg_check_cats()
933 struct ubifs_lpt_heap *heap = &c->lpt_heap[cat - 1]; in dbg_check_cats()
938 ubifs_err(c, "null ptr in LPT heap cat %d", cat); in dbg_check_cats()
942 ubifs_err(c, "bad ptr in LPT heap cat %d", cat); in dbg_check_cats()
946 ubifs_err(c, "taken LEB in LPT heap cat %d", cat); in dbg_check_cats()
955 void dbg_check_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat, in dbg_check_heap() argument
968 if ((lprops->flags & LPROPS_CAT_MASK) != cat) { in dbg_check_heap()
1002 ubifs_err(c, "failed cat %d hpos %d err %d", cat, i, err); in dbg_check_heap()
1004 ubifs_dump_heap(c, heap, cat); in dbg_check_heap()
1026 int cat, lnum = lp->lnum, is_idx = 0, used = 0, free, dirty, ret; in scan_check_cb() local
1029 cat = lp->flags & LPROPS_CAT_MASK; in scan_check_cb()
1030 if (cat != LPROPS_UNCAT) { 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()
1043 switch (cat) { in scan_check_cb()
1068 ubifs_err(c, "bad LPT list (category %d)", cat); in scan_check_cb()
1075 if (in_tree && cat > 0 && cat <= LPROPS_HEAP_CNT) { in scan_check_cb()
1076 struct ubifs_lpt_heap *heap = &c->lpt_heap[cat - 1]; in scan_check_cb()
1080 ubifs_err(c, "bad LPT heap (category %d)", cat); in scan_check_cb()