Lines Matching refs:type
98 swp_entry_t entry = swp_entry(si->type, offset); in __try_to_reclaim_swap()
664 si->type); in get_swap_page()
667 si->type); in get_swap_page()
677 return swp_entry(si->type, offset); in get_swap_page()
679 si->type); in get_swap_page()
704 swp_entry_t get_swap_page_of_type(int type) in get_swap_page_of_type() argument
709 si = swap_info[type]; in get_swap_page_of_type()
717 return swp_entry(type, offset); in get_swap_page_of_type()
728 unsigned long offset, type; in swap_info_get() local
732 type = swp_type(entry); in swap_info_get()
733 if (type >= nr_swapfiles) in swap_info_get()
735 p = swap_info[type]; in swap_info_get()
816 frontswap_invalidate_page(p->type, offset); in swap_entry_free()
1033 int type; in swap_type_of() local
1039 for (type = 0; type < nr_swapfiles; type++) { in swap_type_of()
1040 struct swap_info_struct *sis = swap_info[type]; in swap_type_of()
1050 return type; in swap_type_of()
1061 return type; in swap_type_of()
1076 sector_t swapdev_block(int type, pgoff_t offset) in swapdev_block() argument
1080 if ((unsigned int)type >= nr_swapfiles) in swapdev_block()
1082 if (!(swap_info[type]->flags & SWP_WRITEOK)) in swapdev_block()
1084 return map_swap_entry(swp_entry(type, offset), &bdev); in swapdev_block()
1093 unsigned int count_swap_pages(int type, int free) in count_swap_pages() argument
1098 if ((unsigned int)type < nr_swapfiles) { in count_swap_pages()
1099 struct swap_info_struct *sis = swap_info[type]; in count_swap_pages()
1372 int try_to_unuse(unsigned int type, bool frontswap, in try_to_unuse() argument
1375 struct swap_info_struct *si = swap_info[type]; in try_to_unuse()
1422 entry = swp_entry(type, i); in try_to_unuse()
1604 unsigned int type; in drain_mmlist() local
1606 for (type = 0; type < nr_swapfiles; type++) in drain_mmlist()
1607 if (swap_info[type]->inuse_pages) in drain_mmlist()
1827 frontswap_init(p->type, frontswap_map); in enable_swap_info()
1915 err = try_to_unuse(p->type, false, 0); /* force unuse all pages */ in SYSCALL_DEFINE1()
1956 frontswap_invalidate_area(p->type); in SYSCALL_DEFINE1()
1965 swap_cgroup_swapoff(p->type); in SYSCALL_DEFINE1()
2018 int type; in swap_start() local
2026 for (type = 0; type < nr_swapfiles; type++) { in swap_start()
2028 si = swap_info[type]; in swap_start()
2041 int type; in swap_next() local
2044 type = 0; in swap_next()
2046 type = si->type + 1; in swap_next()
2048 for (; type < nr_swapfiles; type++) { in swap_next()
2050 si = swap_info[type]; in swap_next()
2137 unsigned int type; in alloc_swap_info() local
2144 for (type = 0; type < nr_swapfiles; type++) { in alloc_swap_info()
2145 if (!(swap_info[type]->flags & SWP_USED)) in alloc_swap_info()
2148 if (type >= MAX_SWAPFILES) { in alloc_swap_info()
2153 if (type >= nr_swapfiles) { in alloc_swap_info()
2154 p->type = type; in alloc_swap_info()
2155 swap_info[type] = p; in alloc_swap_info()
2165 p = swap_info[type]; in alloc_swap_info()
2505 error = swap_cgroup_swapon(p->type, maxpages); in SYSCALL_DEFINE2()
2582 swap_cgroup_swapoff(p->type); in SYSCALL_DEFINE2()
2610 unsigned int type; in si_swapinfo() local
2614 for (type = 0; type < nr_swapfiles; type++) { in si_swapinfo()
2615 struct swap_info_struct *si = swap_info[type]; in si_swapinfo()
2639 unsigned long offset, type; in __swap_duplicate() local
2647 type = swp_type(entry); in __swap_duplicate()
2648 if (type >= nr_swapfiles) in __swap_duplicate()
2650 p = swap_info[type]; in __swap_duplicate()