Lines Matching defs:cat

29  * @cat: LEB category
31 static int get_heap_comp_val(struct ubifs_lprops *lprops, int cat)
33 switch (cat) {
48 * @cat: LEB category
56 struct ubifs_lprops *lprops, int cat)
63 val1 = get_heap_comp_val(lprops, cat);
68 val2 = get_heap_comp_val(heap->arr[ppos], cat);
86 * @cat: LEB category
93 struct ubifs_lprops *lprops, int hpos, int cat)
97 val1 = get_heap_comp_val(lprops, cat);
102 val2 = get_heap_comp_val(heap->arr[ppos], cat);
114 val2 = get_heap_comp_val(heap->arr[ppos], cat);
128 val2 = get_heap_comp_val(heap->arr[cpos], cat);
133 cat);
148 val3 = get_heap_comp_val(heap->arr[cpos], cat);
166 * @cat: LEB category
169 * @cat, otherwise %0 is returned because the heap is full.
172 int cat)
174 struct ubifs_lpt_heap *heap = &c->lpt_heap[cat - 1];
187 val1 = get_heap_comp_val(lprops, cat);
188 val2 = get_heap_comp_val(heap->arr[cpos], cat);
198 move_up_lpt_heap(c, heap, lprops, cat);
199 dbg_check_heap(c, heap, cat, lprops->hpos);
202 dbg_check_heap(c, heap, cat, -1);
207 move_up_lpt_heap(c, heap, lprops, cat);
208 dbg_check_heap(c, heap, cat, lprops->hpos);
217 * @cat: LEB category
220 struct ubifs_lprops *lprops, int cat)
225 heap = &c->lpt_heap[cat - 1];
232 adjust_lpt_heap(c, heap, heap->arr[hpos], hpos, cat);
234 dbg_check_heap(c, heap, cat, -1);
242 * @cat: LEB category
251 struct ubifs_lprops *new_lprops, int cat)
256 heap = &c->lpt_heap[cat - 1];
264 * @cat: LEB category to which to add
269 int cat)
271 switch (cat) {
275 if (add_to_lpt_heap(c, lprops, cat))
278 cat = LPROPS_UNCAT;
298 lprops->flags |= cat;
307 * @cat: LEB category from which to remove
312 struct ubifs_lprops *lprops, int cat)
314 switch (cat) {
318 remove_from_lpt_heap(c, lprops, cat);
351 int cat;
353 cat = new_lprops->flags & LPROPS_CAT_MASK;
354 switch (cat) {
358 lpt_heap_replace(c, old_lprops, new_lprops, cat);
382 int cat = lprops->flags & LPROPS_CAT_MASK;
384 if (cat != LPROPS_UNCAT)
386 cat = ubifs_categorize_lprops(c, lprops);
387 if (cat == LPROPS_UNCAT)
390 ubifs_add_to_cat(c, lprops, cat);
862 int i, cat;
934 for (cat = 1; cat <= LPROPS_HEAP_CNT; cat++) {
935 struct ubifs_lpt_heap *heap = &c->lpt_heap[cat - 1];
940 ubifs_err(c, "null ptr in LPT heap cat %d", cat);
944 ubifs_err(c, "bad ptr in LPT heap cat %d", cat);
948 ubifs_err(c, "taken LEB in LPT heap cat %d", cat);
957 void dbg_check_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat,
970 if ((lprops->flags & LPROPS_CAT_MASK) != cat) {
1004 ubifs_err(c, "failed cat %d hpos %d err %d", cat, i, err);
1006 ubifs_dump_heap(c, heap, cat);
1028 int cat, lnum = lp->lnum, is_idx = 0, used = 0, free, dirty, ret;
1031 cat = lp->flags & LPROPS_CAT_MASK;
1032 if (cat != LPROPS_UNCAT) {
1033 cat = ubifs_categorize_lprops(c, lp);
1034 if (cat != (lp->flags & LPROPS_CAT_MASK)) {
1036 (lp->flags & LPROPS_CAT_MASK), cat);
1045 switch (cat) {
1070 ubifs_err(c, "bad LPT list (category %d)", cat);
1077 if (in_tree && cat > 0 && cat <= LPROPS_HEAP_CNT) {
1078 struct ubifs_lpt_heap *heap = &c->lpt_heap[cat - 1];
1082 ubifs_err(c, "bad LPT heap (category %d)", cat);