Lines Matching refs:flush

346 			  enum btrfs_reserve_flush_enum flush)  in calc_available_free_space()  argument
373 if (flush == BTRFS_RESERVE_FLUSH_ALL) in calc_available_free_space()
382 enum btrfs_reserve_flush_enum flush) in btrfs_can_overcommit() argument
392 avail = calc_available_free_space(fs_info, space_info, flush); in btrfs_can_overcommit()
417 enum btrfs_reserve_flush_enum flush = BTRFS_RESERVE_NO_FLUSH; in btrfs_try_granting_tickets() local
432 flush)) { in btrfs_try_granting_tickets()
447 flush = BTRFS_RESERVE_FLUSH_ALL; in btrfs_try_granting_tickets()
1060 space_info->flush = 0; in btrfs_async_reclaim_metadata_space()
1072 space_info->flush = 0; in btrfs_async_reclaim_metadata_space()
1115 space_info->flush = 0; in btrfs_async_reclaim_metadata_space()
1153 enum btrfs_flush_state flush; in btrfs_preempt_reclaim_metadata_space() local
1188 flush = FLUSH_DELALLOC; in btrfs_preempt_reclaim_metadata_space()
1193 flush = COMMIT_TRANS; in btrfs_preempt_reclaim_metadata_space()
1197 flush = FLUSH_DELAYED_ITEMS_NR; in btrfs_preempt_reclaim_metadata_space()
1200 flush = FLUSH_DELAYED_REFS_NR; in btrfs_preempt_reclaim_metadata_space()
1213 flush_space(fs_info, space_info, to_reclaim, flush, true); in btrfs_preempt_reclaim_metadata_space()
1277 space_info->flush = 0; in btrfs_async_reclaim_data_space()
1288 space_info->flush = 0; in btrfs_async_reclaim_data_space()
1305 space_info->flush = 0; in btrfs_async_reclaim_data_space()
1322 space_info->flush = 0; in btrfs_async_reclaim_data_space()
1338 space_info->flush = 0; in btrfs_async_reclaim_data_space()
1506 enum btrfs_reserve_flush_enum flush) in handle_reserve_ticket() argument
1510 switch (flush) { in handle_reserve_ticket()
1544 start_ns, flush, ticket->error); in handle_reserve_ticket()
1552 static inline bool is_normal_flushing(enum btrfs_reserve_flush_enum flush) in is_normal_flushing() argument
1554 return (flush == BTRFS_RESERVE_FLUSH_ALL) || in is_normal_flushing()
1555 (flush == BTRFS_RESERVE_FLUSH_ALL_STEAL); in is_normal_flushing()
1576 static inline bool can_steal(enum btrfs_reserve_flush_enum flush) in can_steal() argument
1578 return (flush == BTRFS_RESERVE_FLUSH_ALL_STEAL || in can_steal()
1579 flush == BTRFS_RESERVE_FLUSH_EVICT); in can_steal()
1586 static inline bool can_ticket(enum btrfs_reserve_flush_enum flush) in can_ticket() argument
1588 return (flush != BTRFS_RESERVE_NO_FLUSH && in can_ticket()
1589 flush != BTRFS_RESERVE_FLUSH_EMERGENCY); in can_ticket()
1609 enum btrfs_reserve_flush_enum flush) in __reserve_bytes() argument
1627 ASSERT(flush != BTRFS_RESERVE_FLUSH_ALL); in __reserve_bytes()
1628 ASSERT(flush != BTRFS_RESERVE_FLUSH_ALL_STEAL); in __reserve_bytes()
1629 ASSERT(flush != BTRFS_RESERVE_FLUSH_EVICT); in __reserve_bytes()
1632 if (flush == BTRFS_RESERVE_FLUSH_DATA) in __reserve_bytes()
1645 if (is_normal_flushing(flush) || (flush == BTRFS_RESERVE_NO_FLUSH)) in __reserve_bytes()
1657 btrfs_can_overcommit(fs_info, space_info, orig_bytes, flush))) { in __reserve_bytes()
1668 if (ret && unlikely(flush == BTRFS_RESERVE_FLUSH_EMERGENCY)) { in __reserve_bytes()
1684 if (ret && can_ticket(flush)) { in __reserve_bytes()
1689 ticket.steal = can_steal(flush); in __reserve_bytes()
1693 if (flush == BTRFS_RESERVE_FLUSH_ALL || in __reserve_bytes()
1694 flush == BTRFS_RESERVE_FLUSH_ALL_STEAL || in __reserve_bytes()
1695 flush == BTRFS_RESERVE_FLUSH_DATA) { in __reserve_bytes()
1697 if (!space_info->flush) { in __reserve_bytes()
1707 space_info->flush = 1; in __reserve_bytes()
1710 orig_bytes, flush, in __reserve_bytes()
1728 orig_bytes, flush, "preempt"); in __reserve_bytes()
1734 if (!ret || !can_ticket(flush)) in __reserve_bytes()
1738 orig_bytes, flush); in __reserve_bytes()
1759 enum btrfs_reserve_flush_enum flush) in btrfs_reserve_metadata_bytes() argument
1763 ret = __reserve_bytes(fs_info, block_rsv->space_info, orig_bytes, flush); in btrfs_reserve_metadata_bytes()
1787 enum btrfs_reserve_flush_enum flush) in btrfs_reserve_data_bytes() argument
1792 ASSERT(flush == BTRFS_RESERVE_FLUSH_DATA || in btrfs_reserve_data_bytes()
1793 flush == BTRFS_RESERVE_FLUSH_FREE_SPACE_INODE || in btrfs_reserve_data_bytes()
1794 flush == BTRFS_RESERVE_NO_FLUSH); in btrfs_reserve_data_bytes()
1795 ASSERT(!current->journal_info || flush != BTRFS_RESERVE_FLUSH_DATA); in btrfs_reserve_data_bytes()
1797 ret = __reserve_bytes(fs_info, data_sinfo, bytes, flush); in btrfs_reserve_data_bytes()