Lines Matching full:free

33 		return lprops->free;  in get_heap_comp_val()
35 return lprops->free + lprops->dirty; in get_heap_comp_val()
50 * is either the amount of free space or the amount of dirty space, depending
88 * of free space or the amount of dirty space, depending on the category.
407 if (lprops->free == c->leb_size) { in ubifs_categorize_lprops()
412 if (lprops->free + lprops->dirty == c->leb_size) { in ubifs_categorize_lprops()
420 if (lprops->dirty + lprops->free >= c->min_idx_node_sz) in ubifs_categorize_lprops()
424 lprops->dirty > lprops->free) in ubifs_categorize_lprops()
426 if (lprops->free > 0) in ubifs_categorize_lprops()
463 * @spc: amount of free and dirty space in the LEB
466 * has @spc bytes of free and dirty space.
469 * space is called "dark space". For example, if an LEB has only %512 free
512 * @free: new free space amount
517 * This function changes LEB properties (@free, @dirty or @flag). However, the
527 int free, int dirty, int flags, in ubifs_change_lp() argument
536 dbg_lp("LEB %d, free %d, dirty %d, flags %d", in ubifs_change_lp()
537 lprops->lnum, free, dirty, flags); in ubifs_change_lp()
549 ubifs_assert(free == LPROPS_NC || free >= 0); in ubifs_change_lp()
559 ubifs_assert(!(lprops->free & 7) && !(lprops->dirty & 7)); in ubifs_change_lp()
562 if ((lprops->flags & LPROPS_TAKEN) && lprops->free == c->leb_size) in ubifs_change_lp()
568 old_spc = lprops->free + lprops->dirty; in ubifs_change_lp()
577 if (free != LPROPS_NC) { in ubifs_change_lp()
578 free = ALIGN(free, 8); in ubifs_change_lp()
579 c->lst.total_free += free - lprops->free; in ubifs_change_lp()
582 if (free == c->leb_size) { in ubifs_change_lp()
583 if (lprops->free != c->leb_size) in ubifs_change_lp()
585 } else if (lprops->free == c->leb_size) in ubifs_change_lp()
587 lprops->free = free; in ubifs_change_lp()
609 new_spc = lprops->free + lprops->dirty; in ubifs_change_lp()
618 if ((lprops->flags & LPROPS_TAKEN) && lprops->free == c->leb_size) in ubifs_change_lp()
643 * @free: amount of free space
654 int ubifs_change_one_lp(struct ubifs_info *c, int lnum, int free, int dirty, in ubifs_change_one_lp() argument
669 lp = ubifs_change_lp(c, lp, free, dirty, flags, idx_gc_cnt); in ubifs_change_one_lp()
685 * @free: amount of free space
693 int ubifs_update_one_lp(struct ubifs_info *c, int lnum, int free, int dirty, in ubifs_update_one_lp() argument
708 lp = ubifs_change_lp(c, lp, free, lp->dirty + dirty, flags, 0); in ubifs_update_one_lp()
753 * ubifs_fast_find_free - try to find a LEB with free space quickly.
756 * This function returns LEB properties for a LEB with free space or %NULL if
795 ubifs_assert(lprops->free == c->leb_size); in ubifs_fast_find_empty()
818 ubifs_assert(lprops->free + lprops->dirty == c->leb_size); in ubifs_fast_find_freeable()
842 ubifs_assert(lprops->free + lprops->dirty == c->leb_size); in ubifs_fast_find_frdi_idx()
866 if (lprops->free != c->leb_size) { in dbg_check_cats()
867 ubifs_err(c, "non-empty LEB %d on empty list (free %d dirty %d flags %d)", in dbg_check_cats()
868 lprops->lnum, lprops->free, lprops->dirty, in dbg_check_cats()
873 ubifs_err(c, "taken LEB %d on empty list (free %d dirty %d flags %d)", in dbg_check_cats()
874 lprops->lnum, lprops->free, lprops->dirty, in dbg_check_cats()
882 if (lprops->free + lprops->dirty != c->leb_size) { in dbg_check_cats()
883 ubifs_err(c, "non-freeable LEB %d on freeable list (free %d dirty %d flags %d)", in dbg_check_cats()
884 lprops->lnum, lprops->free, lprops->dirty, in dbg_check_cats()
889 ubifs_err(c, "taken LEB %d on freeable list (free %d dirty %d flags %d)", in dbg_check_cats()
890 lprops->lnum, lprops->free, lprops->dirty, in dbg_check_cats()
912 if (lprops->free + lprops->dirty != c->leb_size) { in dbg_check_cats()
913 ubifs_err(c, "non-freeable LEB %d on frdi_idx list (free %d dirty %d flags %d)", in dbg_check_cats()
914 lprops->lnum, lprops->free, lprops->dirty, in dbg_check_cats()
919 ubifs_err(c, "taken LEB %d on frdi_idx list (free %d dirty %d flags %d)", in dbg_check_cats()
920 lprops->lnum, lprops->free, lprops->dirty, in dbg_check_cats()
925 ubifs_err(c, "non-index LEB %d on frdi_idx list (free %d dirty %d flags %d)", in dbg_check_cats()
926 lprops->lnum, lprops->free, lprops->dirty, in dbg_check_cats()
1026 int cat, lnum = lp->lnum, is_idx = 0, used = 0, free, dirty, ret; in scan_check_cb() local
1093 if (lp->free == c->leb_size) { in scan_check_cb()
1099 if (lp->free + lp->dirty == c->leb_size && in scan_check_cb()
1101 lst->total_free += lp->free; in scan_check_cb()
1148 free = c->leb_size - sleb->endpt; in scan_check_cb()
1151 if (free > c->leb_size || free < 0 || dirty > c->leb_size || in scan_check_cb()
1153 ubifs_err(c, "bad calculated accounting for LEB %d: free %d, dirty %d", in scan_check_cb()
1154 lnum, free, dirty); in scan_check_cb()
1158 if (lp->free + lp->dirty == c->leb_size && in scan_check_cb()
1159 free + dirty == c->leb_size) in scan_check_cb()
1161 (!is_idx && free == c->leb_size) || in scan_check_cb()
1162 lp->free == c->leb_size) { in scan_check_cb()
1170 free = lp->free; in scan_check_cb()
1175 if (is_idx && lp->free + lp->dirty == free + dirty && in scan_check_cb()
1179 * amount of free space than the value recorded by lprops. That in scan_check_cb()
1180 * is because the in-the-gaps method may use free space or in scan_check_cb()
1181 * create free space (as a side-effect of using ubi_leb_change in scan_check_cb()
1182 * and not writing the whole LEB). The incorrect free space in scan_check_cb()
1185 * write to the free space at the end of an index LEB - except in scan_check_cb()
1188 free = lp->free; in scan_check_cb()
1192 if (lp->free != free || lp->dirty != dirty) in scan_check_cb()
1196 if (free == c->leb_size) in scan_check_cb()
1197 /* Free but not unmapped LEB, it's fine */ in scan_check_cb()
1210 if (free == c->leb_size) in scan_check_cb()
1217 lst->total_used += c->leb_size - free - dirty; in scan_check_cb()
1218 lst->total_free += free; in scan_check_cb()
1222 int spc = free + dirty; in scan_check_cb()
1235 ubifs_err(c, "bad accounting of LEB %d: free %d, dirty %d flags %#x, should be free %d, dirty %d", in scan_check_cb()
1236 lnum, lp->free, lp->dirty, lp->flags, free, dirty); in scan_check_cb()