Lines Matching full:available
109 * as not available);
178 * The index head is not available for the in-the-gaps method, so add an in ubifs_calc_min_idx_lebs()
188 * ubifs_calc_available - calculate available FS space.
192 * This function calculates and returns amount of FS space available for use.
197 long long available; in ubifs_calc_available() local
199 available = c->main_bytes - c->lst.total_used; in ubifs_calc_available()
202 * Now 'available' contains theoretically available flash space in ubifs_calc_available()
220 available -= (long long)subtract_lebs * c->leb_size; in ubifs_calc_available()
222 /* Subtract the dead space which is not available for use */ in ubifs_calc_available()
223 available -= c->lst.total_dead; in ubifs_calc_available()
231 available -= c->lst.total_dark; in ubifs_calc_available()
235 * @min_idx_lebs. Those extra LEBs are assumed to be available, but in ubifs_calc_available()
241 available -= subtract_lebs * c->dark_wm; in ubifs_calc_available()
245 return available > 0 ? available : 0; in ubifs_calc_available()
292 long long outstanding, available; in do_budget_space() local
305 * The number of LEBs that are available to be used by the index is: in do_budget_space()
310 * @c->lst.empty_lebs are available because they are empty. in do_budget_space()
311 * @c->freeable_cnt are available because they contain only free and in do_budget_space()
312 * dirty space, @c->idx_gc_cnt are available because they are index in do_budget_space()
334 available = ubifs_calc_available(c, min_idx_lebs); in do_budget_space()
337 if (unlikely(available < outstanding)) { in do_budget_space()
338 dbg_budg("out of data space: available %lld, outstanding %lld", in do_budget_space()
339 available, outstanding); in do_budget_space()
343 if (available - outstanding <= c->rp_size && !can_use_rp(c)) in do_budget_space()
608 * (e.g., via the 'statfs()' call) reports that it has N bytes available, they
665 long long available, outstanding, free; in ubifs_get_free_space_nolock() local
669 available = ubifs_calc_available(c, c->bi.min_idx_lebs); in ubifs_get_free_space_nolock()
677 * Thus, amend the available space. in ubifs_get_free_space_nolock()
689 available += lebs * (c->dark_wm - c->leb_overhead); in ubifs_get_free_space_nolock()
691 if (available > outstanding) in ubifs_get_free_space_nolock()
692 free = ubifs_reported_space(c, available - outstanding); in ubifs_get_free_space_nolock()