Lines Matching full:flush

66  *     the tail of space_info->tickets, kick async flush thread
297 enum btrfs_reserve_flush_enum flush) in calc_available_free_space() argument
321 * 1/2th of the space. If we can flush, don't let us overcommit in calc_available_free_space()
324 if (flush == BTRFS_RESERVE_FLUSH_ALL) in calc_available_free_space()
333 enum btrfs_reserve_flush_enum flush) in btrfs_can_overcommit() argument
343 avail = calc_available_free_space(fs_info, space_info, flush); in btrfs_can_overcommit()
368 enum btrfs_reserve_flush_enum flush = BTRFS_RESERVE_NO_FLUSH; in btrfs_try_granting_tickets() local
383 flush)) { in btrfs_try_granting_tickets()
398 flush = BTRFS_RESERVE_FLUSH_ALL; in btrfs_try_granting_tickets()
502 /* Calc the number of the pages we need flush for space reservation */ in shrink_delalloc()
515 * it's not enough subsequent flush stages will be more in shrink_delalloc()
526 * ordered extents, otherwise we'll waste time trying to flush delalloc in shrink_delalloc()
612 * Try to flush some data based on policy set by @state. This is only advisory
747 /* The total flushable belongs to the global rsv, don't flush. */ in need_preemptive_reclaim()
826 * flushing when we could still have several gigs of delalloc to flush. in need_preemptive_reclaim()
926 * will loop and continuously try to flush as long as we are making progress.
944 space_info->flush = 0; in btrfs_async_reclaim_metadata_space()
956 space_info->flush = 0; in btrfs_async_reclaim_metadata_space()
999 space_info->flush = 0; in btrfs_async_reclaim_metadata_space()
1012 * from the other flush paths because it doesn't rely on tickets to tell us how
1013 * much we need to flush, instead it attempts to keep us below the 80% full
1037 enum btrfs_flush_state flush; in btrfs_preempt_reclaim_metadata_space() local
1068 * could result in poor allocation patterns, so only flush it if in btrfs_preempt_reclaim_metadata_space()
1073 flush = FLUSH_DELALLOC; in btrfs_preempt_reclaim_metadata_space()
1078 flush = COMMIT_TRANS; in btrfs_preempt_reclaim_metadata_space()
1082 flush = FLUSH_DELAYED_ITEMS_NR; in btrfs_preempt_reclaim_metadata_space()
1085 flush = FLUSH_DELAYED_REFS_NR; in btrfs_preempt_reclaim_metadata_space()
1096 flush_space(fs_info, space_info, to_reclaim, flush, true); in btrfs_preempt_reclaim_metadata_space()
1160 space_info->flush = 0; in btrfs_async_reclaim_data_space()
1171 space_info->flush = 0; in btrfs_async_reclaim_data_space()
1184 space_info->flush = 0; in btrfs_async_reclaim_data_space()
1201 space_info->flush = 0; in btrfs_async_reclaim_data_space()
1324 * @flush: how much we can flush
1326 * This does the work of figuring out how to flush for the ticket, waiting for
1333 enum btrfs_reserve_flush_enum flush) in handle_reserve_ticket() argument
1337 switch (flush) { in handle_reserve_ticket()
1389 start_ns, flush, ticket->error); in handle_reserve_ticket()
1394 * This returns true if this flush state will go through the ordinary flushing
1397 static inline bool is_normal_flushing(enum btrfs_reserve_flush_enum flush) in is_normal_flushing() argument
1399 return (flush == BTRFS_RESERVE_FLUSH_ALL) || in is_normal_flushing()
1400 (flush == BTRFS_RESERVE_FLUSH_ALL_STEAL); in is_normal_flushing()
1427 * @flush: whether or not we can flush to make our reservation
1431 * flush out space to make room. It will do this by flushing delalloc if
1432 * possible or committing the transaction. If flush is 0 then no attempts to
1438 enum btrfs_reserve_flush_enum flush) in __reserve_bytes() argument
1448 ASSERT(!current->journal_info || flush != BTRFS_RESERVE_FLUSH_ALL); in __reserve_bytes()
1450 if (flush == BTRFS_RESERVE_FLUSH_DATA) in __reserve_bytes()
1464 if (is_normal_flushing(flush) || (flush == BTRFS_RESERVE_NO_FLUSH)) in __reserve_bytes()
1476 btrfs_can_overcommit(fs_info, space_info, orig_bytes, flush))) { in __reserve_bytes()
1489 if (ret && flush != BTRFS_RESERVE_NO_FLUSH) { in __reserve_bytes()
1494 ticket.steal = (flush == BTRFS_RESERVE_FLUSH_ALL_STEAL); in __reserve_bytes()
1498 if (flush == BTRFS_RESERVE_FLUSH_ALL || in __reserve_bytes()
1499 flush == BTRFS_RESERVE_FLUSH_ALL_STEAL || in __reserve_bytes()
1500 flush == BTRFS_RESERVE_FLUSH_DATA) { in __reserve_bytes()
1502 if (!space_info->flush) { in __reserve_bytes()
1512 space_info->flush = 1; in __reserve_bytes()
1515 orig_bytes, flush, in __reserve_bytes()
1534 orig_bytes, flush, "preempt"); in __reserve_bytes()
1540 if (!ret || flush == BTRFS_RESERVE_NO_FLUSH) in __reserve_bytes()
1544 orig_bytes, flush); in __reserve_bytes()
1553 * @flush: whether or not we can flush to make our reservation
1557 * flush out space to make room. It will do this by flushing delalloc if
1558 * possible or committing the transaction. If flush is 0 then no attempts to
1565 enum btrfs_reserve_flush_enum flush) in btrfs_reserve_metadata_bytes() argument
1571 ret = __reserve_bytes(fs_info, block_rsv->space_info, orig_bytes, flush); in btrfs_reserve_metadata_bytes()
1595 * @flush: how we are allowed to flush
1598 * space then we will attempt to flush space as specified by flush.
1601 enum btrfs_reserve_flush_enum flush) in btrfs_reserve_data_bytes() argument
1606 ASSERT(flush == BTRFS_RESERVE_FLUSH_DATA || in btrfs_reserve_data_bytes()
1607 flush == BTRFS_RESERVE_FLUSH_FREE_SPACE_INODE); in btrfs_reserve_data_bytes()
1608 ASSERT(!current->journal_info || flush != BTRFS_RESERVE_FLUSH_DATA); in btrfs_reserve_data_bytes()
1610 ret = __reserve_bytes(fs_info, data_sinfo, bytes, flush); in btrfs_reserve_data_bytes()