• Home
  • Raw
  • Download

Lines Matching full:free

6  * This program is free software; you can redistribute it and/or modify it
8 * the Free Software Foundation.
16 * this program; if not, write to the Free Software Foundation, Inc., 51
66 if (lprops->free + lprops->dirty >= c->dark_wm) in valuable()
108 if (lprops->free + lprops->dirty < data->min_space) in scan_for_dirty_cb()
114 if (lprops->free + lprops->dirty == c->leb_size) { in scan_for_dirty_cb()
126 * scan_for_dirty - find a data LEB with free space.
128 * @min_space: minimum amount free plus dirty space the returned LEB has to
130 * @pick_free: if it is OK to return a free or freeable LEB
145 /* There may be an LEB with enough dirty space on the free heap */ in scan_for_dirty()
149 if (lprops->free + lprops->dirty < min_space) in scan_for_dirty()
165 if (lprops->free + lprops->dirty < min_space) in scan_for_dirty()
192 ubifs_assert(c, lprops->free + lprops->dirty >= min_space); in scan_for_dirty()
195 lprops->free + lprops->dirty == c->leb_size)); in scan_for_dirty()
205 * @min_space: minimum amount free plus dirty space the returned LEB has to
210 * @min_space free and dirty space. It prefers to take an LEB from the dirty or
214 * Note, LEBs which have less than dead watermark of free + dirty space are
218 * free or freeable LEB if one is present. For example, GC must to set it to %1,
220 * appearance of free space may coincide with the loss of enough dirty space
224 * just make free space, not return LEBs which are already free or freeable.
261 /* Check if there are enough free LEBs for the index */ in ubifs_find_dirty_leb()
274 * We cannot pick free/freeable LEBs in the below code. in ubifs_find_dirty_leb()
289 sum = idx_lp->free + idx_lp->dirty; in ubifs_find_dirty_leb()
306 if (lp->dirty + lp->free < min_space) in ubifs_find_dirty_leb()
312 if (idx_lp->free + idx_lp->dirty >= lp->free + lp->dirty) in ubifs_find_dirty_leb()
318 ubifs_assert(c, lp->free + lp->dirty >= c->dead_wm); in ubifs_find_dirty_leb()
330 (pick_free && lp->free + lp->dirty == c->leb_size)); in ubifs_find_dirty_leb()
333 dbg_find("found LEB %d, free %d, dirty %d, flags %#x", in ubifs_find_dirty_leb()
334 lp->lnum, lp->free, lp->dirty, lp->flags); in ubifs_find_dirty_leb()
351 * scan_for_free_cb - free space scan callback.
378 if (lprops->free < data->min_space) in scan_for_free_cb()
381 if (!data->pick_free && lprops->free == c->leb_size) in scan_for_free_cb()
384 * LEBs that have only free and dirty space must not be allocated in scan_for_free_cb()
389 if (lprops->free + lprops->dirty == c->leb_size && lprops->dirty > 0) in scan_for_free_cb()
397 * do_find_free_space - find a data LEB with free space.
399 * @min_space: minimum amount of free space required
418 if (lprops && lprops->free >= min_space) in do_find_free_space()
428 if (lprops && lprops->free >= min_space) in do_find_free_space()
431 /* There may be an LEB with enough free space on the dirty heap */ in do_find_free_space()
435 if (lprops->free >= min_space) in do_find_free_space()
439 * A LEB may have fallen off of the bottom of the free heap, and ended in do_find_free_space()
440 * up as uncategorized even though it has enough free space for us now, in do_find_free_space()
450 if (lprops->free >= min_space) in do_find_free_space()
471 ubifs_assert(c, lprops->free >= min_space); in do_find_free_space()
478 * ubifs_find_free_space - find a data LEB with free space.
480 * @min_space: minimum amount of required free space
481 * @offs: contains offset of where free space starts on exit
484 * This function looks for an LEB with at least @min_space bytes of free space.
490 * failed to find a LEB with @min_space bytes of free space and other a negative
561 *offs = c->leb_size - lprops->free; in ubifs_find_free_space()
568 * LEBs that were freeable LEBs (free + dirty == leb_size) will in ubifs_find_free_space()
576 dbg_find("found LEB %d, free %d", lnum, c->leb_size - *offs); in ubifs_find_free_space()
591 * scan_for_idx_cb - callback used by the scan for a free LEB for the index.
618 if (lprops->free + lprops->dirty != c->leb_size) in scan_for_idx_cb()
622 * only free and dirty space, because write buffers are sync'd at commit in scan_for_idx_cb()
630 * scan_for_leb_for_idx - scan for a free LEB for the index.
651 ubifs_assert(c, lprops->free + lprops->dirty == c->leb_size); in scan_for_leb_for_idx()
658 * ubifs_find_free_leb_for_idx - find a free LEB for the index.
661 * This function looks for a free LEB and returns that LEB number. The returned
666 * will be empty. Secondly, free space at the end of an index LEB is not
710 dbg_find("found LEB %d, free %d, dirty %d, flags %#x", in ubifs_find_free_leb_for_idx()
711 lnum, lprops->free, lprops->dirty, lprops->flags); in ubifs_find_free_leb_for_idx()
725 * freeable LEBs (free + dirty == leb_size) will not have been unmapped. in ubifs_find_free_leb_for_idx()
747 return lpa->dirty + lpa->free - lpb->dirty - lpb->free; in cmp_dirty_idx()
761 * dirty index LEBs sorted in order of dirty and free space. This is used by
779 dbg_find("dirtiest index LEB is %d with dirty %d and free %d", in ubifs_save_dirty_idx_lnums()
782 c->dirty_idx.arr[c->dirty_idx.cnt - 1]->free); in ubifs_save_dirty_idx_lnums()
818 if (lprops->free + lprops->dirty < c->min_idx_node_sz) in scan_dirty_idx_cb()
876 ubifs_assert(c, lprops->free + lprops->dirty >= c->min_idx_node_sz); in find_dirty_idx_leb()
880 dbg_find("found dirty LEB %d, free %d, dirty %d, flags %#x", in find_dirty_idx_leb()
881 lprops->lnum, lprops->free, lprops->dirty, lprops->flags); in find_dirty_idx_leb()
915 dbg_find("LEB %d, dirty %d and free %d flags %#x", in get_idx_gc_leb()
916 lp->lnum, lp->dirty, lp->free, lp->flags); in get_idx_gc_leb()
945 dbg_find("LEB %d, dirty %d and free %d flags %#x", lp->lnum, lp->dirty, in find_dirtiest_idx_leb()
946 lp->free, lp->flags); in find_dirtiest_idx_leb()
956 * This function attempts to find an untaken index LEB with the most free and