Lines Matching refs:dirty

54 		if (lprops->free + lprops->dirty >= c->dark_wm)
72 * scan_for_dirty_cb - dirty space scan callback.
97 if (lprops->free + lprops->dirty < data->min_space)
103 if (lprops->free + lprops->dirty == c->leb_size) {
106 /* Exclude LEBs with too little dirty space (unless it is empty) */
107 } else if (lprops->dirty < c->dead_wm)
117 * @min_space: minimum amount free plus dirty space the returned LEB has to
134 /* There may be an LEB with enough dirty space on the free heap */
138 if (lprops->free + lprops->dirty < min_space)
140 if (lprops->dirty < c->dead_wm)
145 * A LEB may have fallen off of the bottom of the dirty heap, and ended
146 * up as uncategorized even though it has enough dirty space for us now,
154 if (lprops->free + lprops->dirty < min_space)
158 if (lprops->dirty < c->dead_wm)
180 ubifs_assert(c, lprops->free + lprops->dirty >= min_space);
181 ubifs_assert(c, lprops->dirty >= c->dead_wm ||
183 lprops->free + lprops->dirty == c->leb_size));
190 * ubifs_find_dirty_leb - find a dirty LEB for the Garbage Collector.
193 * @min_space: minimum amount free plus dirty space the returned LEB has to
197 * This function tries to find a dirty logical eraseblock which has at least
198 * @min_space free and dirty space. It prefers to take an LEB from the dirty or
199 * dirty index heap, and it falls-back to LPT scanning if the heaps are empty
202 * Note, LEBs which have less than dead watermark of free + dirty space are
208 * appearance of free space may coincide with the loss of enough dirty space
217 * This function returns zero and the LEB properties of found dirty LEB in case
218 * of success, %-ENOSPC if no dirty LEB was found and a negative error code in
271 /* Look on the dirty and dirty index heaps */
277 sum = idx_lp->free + idx_lp->dirty;
281 * with less than, say, half LEB of dirty space. May be half is
294 if (lp->dirty + lp->free < min_space)
300 if (idx_lp->free + idx_lp->dirty >= lp->free + lp->dirty)
306 ubifs_assert(c, lp->free + lp->dirty >= c->dead_wm);
310 /* Did not find a dirty LEB on the dirty heaps, have to scan */
311 dbg_find("scanning LPT for a dirty LEB");
317 ubifs_assert(c, lp->dirty >= c->dead_wm ||
318 (pick_free && lp->free + lp->dirty == c->leb_size));
321 dbg_find("found LEB %d, free %d, dirty %d, flags %#x",
322 lp->lnum, lp->free, lp->dirty, lp->flags);
373 * LEBs that have only free and dirty space must not be allocated
378 if (lprops->free + lprops->dirty == c->leb_size && lprops->dirty > 0)
420 /* There may be an LEB with enough free space on the dirty heap */
557 * LEBs that were freeable LEBs (free + dirty == leb_size) will
608 if (lprops->free + lprops->dirty != c->leb_size)
612 * only free and dirty space, because write buffers are sync'd at commit
640 ubifs_assert(c, lprops->free + lprops->dirty == c->leb_size);
699 dbg_find("found LEB %d, free %d, dirty %d, flags %#x",
700 lnum, lprops->free, lprops->dirty, lprops->flags);
714 * freeable LEBs (free + dirty == leb_size) will not have been unmapped.
735 return lpa->dirty + lpa->free - lpb->dirty - lpb->free;
739 * ubifs_save_dirty_idx_lnums - save an array of the most dirty index LEB nos.
743 * dirty index LEBs sorted in order of dirty and free space. This is used by
758 dbg_find("found %d dirty index LEBs", c->dirty_idx.cnt);
760 dbg_find("dirtiest index LEB is %d with dirty %d and free %d",
762 c->dirty_idx.arr[c->dirty_idx.cnt - 1]->dirty,
772 * scan_dirty_idx_cb - callback used by the scan for a dirty index LEB.
800 if (lprops->free + lprops->dirty < c->min_idx_node_sz)
808 * find_dirty_idx_leb - find a dirty index LEB.
812 * failure. In particular, -ENOSPC is returned if a dirty index LEB is not
857 ubifs_assert(c, lprops->free + lprops->dirty >= c->min_idx_node_sz);
861 dbg_find("found dirty LEB %d, free %d, dirty %d, flags %#x",
862 lprops->lnum, lprops->free, lprops->dirty, lprops->flags);
896 dbg_find("LEB %d, dirty %d and free %d flags %#x",
897 lp->lnum, lp->dirty, lp->free, lp->flags);
926 dbg_find("LEB %d, dirty %d and free %d flags %#x", lp->lnum, lp->dirty,
938 * dirty space that can be used without overwriting index nodes that were in the