Lines Matching refs:info
199 static inline void cluster_set_flag(struct swap_cluster_info *info, in cluster_set_flag() argument
202 info->flags = flag; in cluster_set_flag()
205 static inline unsigned int cluster_count(struct swap_cluster_info *info) in cluster_count() argument
207 return info->data; in cluster_count()
210 static inline void cluster_set_count(struct swap_cluster_info *info, in cluster_set_count() argument
213 info->data = c; in cluster_set_count()
216 static inline void cluster_set_count_flag(struct swap_cluster_info *info, in cluster_set_count_flag() argument
219 info->flags = f; in cluster_set_count_flag()
220 info->data = c; in cluster_set_count_flag()
223 static inline unsigned int cluster_next(struct swap_cluster_info *info) in cluster_next() argument
225 return info->data; in cluster_next()
228 static inline void cluster_set_next(struct swap_cluster_info *info, in cluster_set_next() argument
231 info->data = n; in cluster_set_next()
234 static inline void cluster_set_next_flag(struct swap_cluster_info *info, in cluster_set_next_flag() argument
237 info->flags = f; in cluster_set_next_flag()
238 info->data = n; in cluster_set_next_flag()
241 static inline bool cluster_is_free(struct swap_cluster_info *info) in cluster_is_free() argument
243 return info->flags & CLUSTER_FLAG_FREE; in cluster_is_free()
246 static inline bool cluster_is_null(struct swap_cluster_info *info) in cluster_is_null() argument
248 return info->flags & CLUSTER_FLAG_NEXT_NULL; in cluster_is_null()
251 static inline void cluster_set_null(struct swap_cluster_info *info) in cluster_set_null() argument
253 info->flags = CLUSTER_FLAG_NEXT_NULL; in cluster_set_null()
254 info->data = 0; in cluster_set_null()
291 struct swap_cluster_info *info; in swap_do_scheduled_discard() local
294 info = si->cluster_info; in swap_do_scheduled_discard()
300 cluster_next(&info[idx]), 0); in swap_do_scheduled_discard()
311 cluster_set_flag(&info[idx], CLUSTER_FLAG_FREE); in swap_do_scheduled_discard()
321 cluster_set_next(&info[tail], idx); in swap_do_scheduled_discard()
2225 if (swab32(swap_header->info.version) == 1) { in read_swap_header()
2226 swab32s(&swap_header->info.version); in read_swap_header()
2227 swab32s(&swap_header->info.last_page); in read_swap_header()
2228 swab32s(&swap_header->info.nr_badpages); in read_swap_header()
2229 if (swap_header->info.nr_badpages > MAX_SWAP_BADPAGES) in read_swap_header()
2231 for (i = 0; i < swap_header->info.nr_badpages; i++) in read_swap_header()
2232 swab32s(&swap_header->info.badpages[i]); in read_swap_header()
2235 if (swap_header->info.version != 1) { in read_swap_header()
2237 swap_header->info.version); in read_swap_header()
2261 last_page = swap_header->info.last_page; in read_swap_header()
2282 if (swap_header->info.nr_badpages && S_ISREG(inode->i_mode)) in read_swap_header()
2284 if (swap_header->info.nr_badpages > MAX_SWAP_BADPAGES) in read_swap_header()
2310 for (i = 0; i < swap_header->info.nr_badpages; i++) { in setup_swap_map_and_extents()
2311 unsigned int page_nr = swap_header->info.badpages[i]; in setup_swap_map_and_extents()
2312 if (page_nr == 0 || page_nr > swap_header->info.last_page) in setup_swap_map_and_extents()