Lines Matching full:free

30 		return lprops->free;  in get_heap_comp_val()
32 return lprops->free + lprops->dirty; in get_heap_comp_val()
47 * is either the amount of free space or the amount of dirty space, depending
85 * of free space or the amount of dirty space, depending on the category.
402 if (lprops->free == c->leb_size) { in ubifs_categorize_lprops()
407 if (lprops->free + lprops->dirty == c->leb_size) { in ubifs_categorize_lprops()
415 if (lprops->dirty + lprops->free >= c->min_idx_node_sz) in ubifs_categorize_lprops()
419 lprops->dirty > lprops->free) in ubifs_categorize_lprops()
421 if (lprops->free > 0) in ubifs_categorize_lprops()
458 * @spc: amount of free and dirty space in the LEB
461 * has @spc bytes of free and dirty space.
464 * space is called "dark space". For example, if an LEB has only %512 free
507 * @free: new free space amount
512 * This function changes LEB properties (@free, @dirty or @flag). However, the
522 int free, int dirty, int flags, in ubifs_change_lp() argument
531 dbg_lp("LEB %d, free %d, dirty %d, flags %d", in ubifs_change_lp()
532 lprops->lnum, free, dirty, flags); in ubifs_change_lp()
544 ubifs_assert(c, free == LPROPS_NC || free >= 0); in ubifs_change_lp()
554 ubifs_assert(c, !(lprops->free & 7) && !(lprops->dirty & 7)); in ubifs_change_lp()
557 if ((lprops->flags & LPROPS_TAKEN) && lprops->free == c->leb_size) in ubifs_change_lp()
563 old_spc = lprops->free + lprops->dirty; in ubifs_change_lp()
572 if (free != LPROPS_NC) { in ubifs_change_lp()
573 free = ALIGN(free, 8); in ubifs_change_lp()
574 c->lst.total_free += free - lprops->free; in ubifs_change_lp()
577 if (free == c->leb_size) { in ubifs_change_lp()
578 if (lprops->free != c->leb_size) in ubifs_change_lp()
580 } else if (lprops->free == c->leb_size) in ubifs_change_lp()
582 lprops->free = free; in ubifs_change_lp()
604 new_spc = lprops->free + lprops->dirty; in ubifs_change_lp()
613 if ((lprops->flags & LPROPS_TAKEN) && lprops->free == c->leb_size) in ubifs_change_lp()
638 * @free: amount of free space
649 int ubifs_change_one_lp(struct ubifs_info *c, int lnum, int free, int dirty, in ubifs_change_one_lp() argument
664 lp = ubifs_change_lp(c, lp, free, dirty, flags, idx_gc_cnt); in ubifs_change_one_lp()
680 * @free: amount of free space
688 int ubifs_update_one_lp(struct ubifs_info *c, int lnum, int free, int dirty, in ubifs_update_one_lp() argument
703 lp = ubifs_change_lp(c, lp, free, lp->dirty + dirty, flags, 0); in ubifs_update_one_lp()
748 * ubifs_fast_find_free - try to find a LEB with free space quickly.
751 * This function returns LEB properties for a LEB with free space or %NULL if
790 ubifs_assert(c, lprops->free == c->leb_size); in ubifs_fast_find_empty()
813 ubifs_assert(c, lprops->free + lprops->dirty == c->leb_size); in ubifs_fast_find_freeable()
837 ubifs_assert(c, lprops->free + lprops->dirty == c->leb_size); in ubifs_fast_find_frdi_idx()
861 if (lprops->free != c->leb_size) { in dbg_check_cats()
862 ubifs_err(c, "non-empty LEB %d on empty list (free %d dirty %d flags %d)", in dbg_check_cats()
863 lprops->lnum, lprops->free, lprops->dirty, in dbg_check_cats()
868 ubifs_err(c, "taken LEB %d on empty list (free %d dirty %d flags %d)", in dbg_check_cats()
869 lprops->lnum, lprops->free, lprops->dirty, in dbg_check_cats()
877 if (lprops->free + lprops->dirty != c->leb_size) { in dbg_check_cats()
878 ubifs_err(c, "non-freeable LEB %d on freeable list (free %d dirty %d flags %d)", in dbg_check_cats()
879 lprops->lnum, lprops->free, lprops->dirty, in dbg_check_cats()
884 ubifs_err(c, "taken LEB %d on freeable list (free %d dirty %d flags %d)", in dbg_check_cats()
885 lprops->lnum, lprops->free, lprops->dirty, in dbg_check_cats()
907 if (lprops->free + lprops->dirty != c->leb_size) { in dbg_check_cats()
908 ubifs_err(c, "non-freeable LEB %d on frdi_idx list (free %d dirty %d flags %d)", in dbg_check_cats()
909 lprops->lnum, lprops->free, lprops->dirty, in dbg_check_cats()
914 ubifs_err(c, "taken LEB %d on frdi_idx list (free %d dirty %d flags %d)", in dbg_check_cats()
915 lprops->lnum, lprops->free, lprops->dirty, in dbg_check_cats()
920 ubifs_err(c, "non-index LEB %d on frdi_idx list (free %d dirty %d flags %d)", in dbg_check_cats()
921 lprops->lnum, lprops->free, lprops->dirty, in dbg_check_cats()
1022 int cat, lnum = lp->lnum, is_idx = 0, used = 0, free, dirty, ret; in scan_check_cb() local
1085 if (lp->free == c->leb_size) { in scan_check_cb()
1091 if (lp->free + lp->dirty == c->leb_size && in scan_check_cb()
1093 lst->total_free += lp->free; in scan_check_cb()
1144 free = c->leb_size - sleb->endpt; in scan_check_cb()
1147 if (free > c->leb_size || free < 0 || dirty > c->leb_size || in scan_check_cb()
1149 ubifs_err(c, "bad calculated accounting for LEB %d: free %d, dirty %d", in scan_check_cb()
1150 lnum, free, dirty); in scan_check_cb()
1154 if (lp->free + lp->dirty == c->leb_size && in scan_check_cb()
1155 free + dirty == c->leb_size) in scan_check_cb()
1157 (!is_idx && free == c->leb_size) || in scan_check_cb()
1158 lp->free == c->leb_size) { in scan_check_cb()
1166 free = lp->free; in scan_check_cb()
1171 if (is_idx && lp->free + lp->dirty == free + dirty && in scan_check_cb()
1175 * amount of free space than the value recorded by lprops. That in scan_check_cb()
1176 * is because the in-the-gaps method may use free space or in scan_check_cb()
1177 * create free space (as a side-effect of using ubi_leb_change in scan_check_cb()
1178 * and not writing the whole LEB). The incorrect free space in scan_check_cb()
1181 * write to the free space at the end of an index LEB - except in scan_check_cb()
1184 free = lp->free; in scan_check_cb()
1188 if (lp->free != free || lp->dirty != dirty) in scan_check_cb()
1192 if (free == c->leb_size) in scan_check_cb()
1193 /* Free but not unmapped LEB, it's fine */ in scan_check_cb()
1206 if (free == c->leb_size) in scan_check_cb()
1213 lst->total_used += c->leb_size - free - dirty; in scan_check_cb()
1214 lst->total_free += free; in scan_check_cb()
1218 int spc = free + dirty; in scan_check_cb()
1231 ubifs_err(c, "bad accounting of LEB %d: free %d, dirty %d flags %#x, should be free %d, dirty %d", in scan_check_cb()
1232 lnum, lp->free, lp->dirty, lp->flags, free, dirty); in scan_check_cb()