Home | History | Annotate | Download | only in ubifs

Lines Matching refs:cat

27  * @cat: LEB category
29 static int get_heap_comp_val(struct ubifs_lprops *lprops, int cat)
31 switch (cat) {
46 * @cat: LEB category
54 struct ubifs_lprops *lprops, int cat)
61 val1 = get_heap_comp_val(lprops, cat);
66 val2 = get_heap_comp_val(heap->arr[ppos], cat);
84 * @cat: LEB category
91 struct ubifs_lprops *lprops, int hpos, int cat)
95 val1 = get_heap_comp_val(lprops, cat);
100 val2 = get_heap_comp_val(heap->arr[ppos], cat);
112 val2 = get_heap_comp_val(heap->arr[ppos], cat);
126 val2 = get_heap_comp_val(heap->arr[cpos], cat);
131 cat);
146 val3 = get_heap_comp_val(heap->arr[cpos], cat);
164 * @cat: LEB category
167 * @cat, otherwise %0 is returned because the heap is full.
170 int cat)
172 struct ubifs_lpt_heap *heap = &c->lpt_heap[cat - 1];
185 val1 = get_heap_comp_val(lprops, cat);
186 val2 = get_heap_comp_val(heap->arr[cpos], cat);
196 move_up_lpt_heap(c, heap, lprops, cat);
197 dbg_check_heap(c, heap, cat, lprops->hpos);
200 dbg_check_heap(c, heap, cat, -1);
205 move_up_lpt_heap(c, heap, lprops, cat);
206 dbg_check_heap(c, heap, cat, lprops->hpos);
215 * @cat: LEB category
218 struct ubifs_lprops *lprops, int cat)
223 heap = &c->lpt_heap[cat - 1];
230 adjust_lpt_heap(c, heap, heap->arr[hpos], hpos, cat);
232 dbg_check_heap(c, heap, cat, -1);
240 * @cat: LEB category
249 struct ubifs_lprops *new_lprops, int cat)
254 heap = &c->lpt_heap[cat - 1];
262 * @cat: LEB category to which to add
267 int cat)
269 switch (cat) {
273 if (add_to_lpt_heap(c, lprops, cat))
276 cat = LPROPS_UNCAT;
296 lprops->flags |= cat;
305 * @cat: LEB category from which to remove
310 struct ubifs_lprops *lprops, int cat)
312 switch (cat) {
316 remove_from_lpt_heap(c, lprops, cat);
349 int cat;
351 cat = new_lprops->flags & LPROPS_CAT_MASK;
352 switch (cat) {
356 lpt_heap_replace(c, old_lprops, new_lprops, cat);
380 int cat = lprops->flags & LPROPS_CAT_MASK;
382 if (cat != LPROPS_UNCAT)
384 cat = ubifs_categorize_lprops(c, lprops);
385 if (cat == LPROPS_UNCAT)
388 ubifs_add_to_cat(c, lprops, cat);
860 int i, cat;
932 for (cat = 1; cat <= LPROPS_HEAP_CNT; cat++) {
933 struct ubifs_lpt_heap *heap = &c->lpt_heap[cat - 1];
938 ubifs_err(c, "null ptr in LPT heap cat %d", cat);
942 ubifs_err(c, "bad ptr in LPT heap cat %d", cat);
946 ubifs_err(c, "taken LEB in LPT heap cat %d", cat);
955 void dbg_check_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat,
968 if ((lprops->flags & LPROPS_CAT_MASK) != cat) {
1002 ubifs_err(c, "failed cat %d hpos %d err %d", cat, i, err);
1004 ubifs_dump_heap(c, heap, cat);
1026 int cat, lnum = lp->lnum, is_idx = 0, used = 0, free, dirty, ret;
1029 cat = lp->flags & LPROPS_CAT_MASK;
1030 if (cat != LPROPS_UNCAT) {
1031 cat = ubifs_categorize_lprops(c, lp);
1032 if (cat != (lp->flags & LPROPS_CAT_MASK)) {
1034 (lp->flags & LPROPS_CAT_MASK), cat);
1043 switch (cat) {
1068 ubifs_err(c, "bad LPT list (category %d)", cat);
1075 if (in_tree && cat > 0 && cat <= LPROPS_HEAP_CNT) {
1076 struct ubifs_lpt_heap *heap = &c->lpt_heap[cat - 1];
1080 ubifs_err(c, "bad LPT heap (category %d)", cat);