Lines Matching refs:flush

66  *     the tail of space_info->tickets, kick async flush thread
300 enum btrfs_reserve_flush_enum flush)
324 * 1/2th of the space. If we can flush, don't let us overcommit
327 if (flush == BTRFS_RESERVE_FLUSH_ALL)
336 enum btrfs_reserve_flush_enum flush)
346 avail = calc_available_free_space(fs_info, space_info, flush);
371 enum btrfs_reserve_flush_enum flush = BTRFS_RESERVE_NO_FLUSH;
386 flush)) {
401 flush = BTRFS_RESERVE_FLUSH_ALL;
498 /* Calc the number of the pages we need flush for space reservation */
528 * ordered extents, otherwise we'll waste time trying to flush delalloc
667 * Try to flush some data based on policy set by @state. This is only advisory
918 * will loop and continuously try to flush as long as we are making progress.
936 space_info->flush = 0;
948 space_info->flush = 0;
983 space_info->flush = 0;
1065 space_info->flush = 0;
1076 space_info->flush = 0;
1089 space_info->flush = 0;
1106 space_info->flush = 0;
1222 * @flush - how much we can flush
1224 * This does the work of figuring out how to flush for the ticket, waiting for
1230 enum btrfs_reserve_flush_enum flush)
1234 switch (flush) {
1289 * This returns true if this flush state will go through the ordinary flushing
1292 static inline bool is_normal_flushing(enum btrfs_reserve_flush_enum flush)
1294 return (flush == BTRFS_RESERVE_FLUSH_ALL) ||
1295 (flush == BTRFS_RESERVE_FLUSH_ALL_STEAL);
1303 * @flush - whether or not we can flush to make our reservation
1307 * flush out space to make room. It will do this by flushing delalloc if
1308 * possible or committing the transaction. If flush is 0 then no attempts to
1314 enum btrfs_reserve_flush_enum flush)
1323 ASSERT(!current->journal_info || flush != BTRFS_RESERVE_FLUSH_ALL);
1325 if (flush == BTRFS_RESERVE_FLUSH_DATA)
1339 if (is_normal_flushing(flush) || (flush == BTRFS_RESERVE_NO_FLUSH))
1351 btrfs_can_overcommit(fs_info, space_info, orig_bytes, flush))) {
1364 if (ret && flush != BTRFS_RESERVE_NO_FLUSH) {
1369 ticket.steal = (flush == BTRFS_RESERVE_FLUSH_ALL_STEAL);
1370 if (flush == BTRFS_RESERVE_FLUSH_ALL ||
1371 flush == BTRFS_RESERVE_FLUSH_ALL_STEAL ||
1372 flush == BTRFS_RESERVE_FLUSH_DATA) {
1374 if (!space_info->flush) {
1375 space_info->flush = 1;
1378 orig_bytes, flush,
1397 orig_bytes, flush, "preempt");
1403 if (!ret || flush == BTRFS_RESERVE_NO_FLUSH)
1406 return handle_reserve_ticket(fs_info, space_info, &ticket, flush);
1414 * @flush - whether or not we can flush to make our reservation
1418 * flush out space to make room. It will do this by flushing delalloc if
1419 * possible or committing the transaction. If flush is 0 then no attempts to
1426 enum btrfs_reserve_flush_enum flush)
1432 ret = __reserve_bytes(fs_info, block_rsv->space_info, orig_bytes, flush);
1455 * @flush - how we are allowed to flush
1458 * space then we will attempt to flush space as specified by flush.
1461 enum btrfs_reserve_flush_enum flush)
1466 ASSERT(flush == BTRFS_RESERVE_FLUSH_DATA ||
1467 flush == BTRFS_RESERVE_FLUSH_FREE_SPACE_INODE);
1468 ASSERT(!current->journal_info || flush != BTRFS_RESERVE_FLUSH_DATA);
1470 ret = __reserve_bytes(fs_info, data_sinfo, bytes, flush);