Lines Matching full:flush
66 * the tail of space_info->tickets, kick async flush thread
300 enum btrfs_reserve_flush_enum flush) in calc_available_free_space() argument
324 * 1/2th of the space. If we can flush, don't let us overcommit in calc_available_free_space()
327 if (flush == BTRFS_RESERVE_FLUSH_ALL) in calc_available_free_space()
336 enum btrfs_reserve_flush_enum flush) in btrfs_can_overcommit() argument
346 avail = calc_available_free_space(fs_info, space_info, flush); in btrfs_can_overcommit()
371 enum btrfs_reserve_flush_enum flush = BTRFS_RESERVE_NO_FLUSH; in btrfs_try_granting_tickets() local
386 flush)) { in btrfs_try_granting_tickets()
401 flush = BTRFS_RESERVE_FLUSH_ALL; in btrfs_try_granting_tickets()
497 /* Calc the number of the pages we need flush for space reservation */ in shrink_delalloc()
527 * ordered extents, otherwise we'll waste time trying to flush delalloc in shrink_delalloc()
664 * Try to flush some data based on policy set by @state. This is only advisory
915 * will loop and continuously try to flush as long as we are making progress.
933 space_info->flush = 0; in btrfs_async_reclaim_metadata_space()
945 space_info->flush = 0; in btrfs_async_reclaim_metadata_space()
980 space_info->flush = 0; in btrfs_async_reclaim_metadata_space()
1062 space_info->flush = 0; in btrfs_async_reclaim_data_space()
1073 space_info->flush = 0; in btrfs_async_reclaim_data_space()
1086 space_info->flush = 0; in btrfs_async_reclaim_data_space()
1103 space_info->flush = 0; in btrfs_async_reclaim_data_space()
1219 * @flush - how much we can flush
1221 * This does the work of figuring out how to flush for the ticket, waiting for
1227 enum btrfs_reserve_flush_enum flush) in handle_reserve_ticket() argument
1231 switch (flush) { in handle_reserve_ticket()
1286 * This returns true if this flush state will go through the ordinary flushing
1289 static inline bool is_normal_flushing(enum btrfs_reserve_flush_enum flush) in is_normal_flushing() argument
1291 return (flush == BTRFS_RESERVE_FLUSH_ALL) || in is_normal_flushing()
1292 (flush == BTRFS_RESERVE_FLUSH_ALL_STEAL); in is_normal_flushing()
1300 * @flush - whether or not we can flush to make our reservation
1304 * flush out space to make room. It will do this by flushing delalloc if
1305 * possible or committing the transaction. If flush is 0 then no attempts to
1311 enum btrfs_reserve_flush_enum flush) in __reserve_bytes() argument
1320 ASSERT(!current->journal_info || flush != BTRFS_RESERVE_FLUSH_ALL); in __reserve_bytes()
1322 if (flush == BTRFS_RESERVE_FLUSH_DATA) in __reserve_bytes()
1336 if (is_normal_flushing(flush) || (flush == BTRFS_RESERVE_NO_FLUSH)) in __reserve_bytes()
1348 btrfs_can_overcommit(fs_info, space_info, orig_bytes, flush))) { in __reserve_bytes()
1361 if (ret && flush != BTRFS_RESERVE_NO_FLUSH) { in __reserve_bytes()
1366 ticket.steal = (flush == BTRFS_RESERVE_FLUSH_ALL_STEAL); in __reserve_bytes()
1367 if (flush == BTRFS_RESERVE_FLUSH_ALL || in __reserve_bytes()
1368 flush == BTRFS_RESERVE_FLUSH_ALL_STEAL || in __reserve_bytes()
1369 flush == BTRFS_RESERVE_FLUSH_DATA) { in __reserve_bytes()
1371 if (!space_info->flush) { in __reserve_bytes()
1372 space_info->flush = 1; in __reserve_bytes()
1375 orig_bytes, flush, in __reserve_bytes()
1394 orig_bytes, flush, "preempt"); in __reserve_bytes()
1400 if (!ret || flush == BTRFS_RESERVE_NO_FLUSH) in __reserve_bytes()
1403 return handle_reserve_ticket(fs_info, space_info, &ticket, flush); in __reserve_bytes()
1411 * @flush - whether or not we can flush to make our reservation
1415 * flush out space to make room. It will do this by flushing delalloc if
1416 * possible or committing the transaction. If flush is 0 then no attempts to
1423 enum btrfs_reserve_flush_enum flush) in btrfs_reserve_metadata_bytes() argument
1429 ret = __reserve_bytes(fs_info, block_rsv->space_info, orig_bytes, flush); in btrfs_reserve_metadata_bytes()
1452 * @flush - how we are allowed to flush
1455 * space then we will attempt to flush space as specified by flush.
1458 enum btrfs_reserve_flush_enum flush) in btrfs_reserve_data_bytes() argument
1463 ASSERT(flush == BTRFS_RESERVE_FLUSH_DATA || in btrfs_reserve_data_bytes()
1464 flush == BTRFS_RESERVE_FLUSH_FREE_SPACE_INODE); in btrfs_reserve_data_bytes()
1465 ASSERT(!current->journal_info || flush != BTRFS_RESERVE_FLUSH_DATA); in btrfs_reserve_data_bytes()
1467 ret = __reserve_bytes(fs_info, data_sinfo, bytes, flush); in btrfs_reserve_data_bytes()