Lines Matching refs:cluster_next
223 static inline unsigned int cluster_next(struct swap_cluster_info *info) in cluster_next() function
276 unsigned int tail = cluster_next(&si->discard_cluster_tail); in swap_cluster_schedule_discard()
297 idx = cluster_next(&si->discard_cluster_head); in swap_do_scheduled_discard()
300 cluster_next(&info[idx]), 0); in swap_do_scheduled_discard()
301 if (cluster_next(&si->discard_cluster_tail) == idx) { in swap_do_scheduled_discard()
320 tail = cluster_next(&si->free_cluster_tail); in swap_do_scheduled_discard()
353 VM_BUG_ON(cluster_next(&p->free_cluster_head) != idx); in inc_cluster_info_page()
355 cluster_next(&cluster_info[idx]), 0); in inc_cluster_info_page()
356 if (cluster_next(&p->free_cluster_tail) == idx) { in inc_cluster_info_page()
402 unsigned int tail = cluster_next(&p->free_cluster_tail); in dec_cluster_info_page()
422 offset != cluster_next(&si->free_cluster_head) && in scan_swap_map_ssd_cluster_conflict()
449 cluster->next = cluster_next(&cluster->index) * in scan_swap_map_try_ssd_cluster()
457 *scan_base = *offset = si->cluster_next; in scan_swap_map_try_ssd_cluster()
470 while (tmp < si->max && tmp < (cluster_next(&cluster->index) + 1) * in scan_swap_map_try_ssd_cluster()
507 scan_base = offset = si->cluster_next; in scan_swap_map()
539 si->cluster_next = offset; in scan_swap_map()
595 si->cluster_next = offset + 1; in scan_swap_map()
2198 p->cluster_next = 1; in read_swap_header()
2257 unsigned long idx = p->cluster_next / SWAPFILE_CLUSTER; in setup_swap_map_and_extents()
2318 tail = cluster_next(&p->free_cluster_tail); in setup_swap_map_and_extents()
2441 p->cluster_next = 1 + (prandom_u32() % p->highest_bit); in SYSCALL_DEFINE2()