Lines Matching defs:info
288 static inline void cluster_set_flag(struct swap_cluster_info *info,
291 info->flags = flag;
294 static inline unsigned int cluster_count(struct swap_cluster_info *info)
296 return info->data;
299 static inline void cluster_set_count(struct swap_cluster_info *info,
302 info->data = c;
305 static inline void cluster_set_count_flag(struct swap_cluster_info *info,
308 info->flags = f;
309 info->data = c;
312 static inline unsigned int cluster_next(struct swap_cluster_info *info)
314 return info->data;
317 static inline void cluster_set_next(struct swap_cluster_info *info,
320 info->data = n;
323 static inline void cluster_set_next_flag(struct swap_cluster_info *info,
326 info->flags = f;
327 info->data = n;
330 static inline bool cluster_is_free(struct swap_cluster_info *info)
332 return info->flags & CLUSTER_FLAG_FREE;
335 static inline bool cluster_is_null(struct swap_cluster_info *info)
337 return info->flags & CLUSTER_FLAG_NEXT_NULL;
340 static inline void cluster_set_null(struct swap_cluster_info *info)
342 info->flags = CLUSTER_FLAG_NEXT_NULL;
343 info->data = 0;
346 static inline bool cluster_is_huge(struct swap_cluster_info *info)
349 return info->flags & CLUSTER_FLAG_HUGE;
353 static inline void cluster_clear_huge(struct swap_cluster_info *info)
355 info->flags &= ~CLUSTER_FLAG_HUGE;
491 struct swap_cluster_info *info, *ci;
494 info = si->cluster_info;
497 idx = cluster_list_del_first(&si->discard_clusters, info);
1232 * __swap_entry_free(), the swap info might become stale and should not
2849 if (swab32(swap_header->info.version) == 1) {
2850 swab32s(&swap_header->info.version);
2851 swab32s(&swap_header->info.last_page);
2852 swab32s(&swap_header->info.nr_badpages);
2853 if (swap_header->info.nr_badpages > MAX_SWAP_BADPAGES)
2855 for (i = 0; i < swap_header->info.nr_badpages; i++)
2856 swab32s(&swap_header->info.badpages[i]);
2859 if (swap_header->info.version != 1) {
2861 swap_header->info.version);
2870 last_page = swap_header->info.last_page;
2894 if (swap_header->info.nr_badpages && S_ISREG(inode->i_mode))
2896 if (swap_header->info.nr_badpages > MAX_SWAP_BADPAGES)
2928 for (i = 0; i < swap_header->info.nr_badpages; i++) {
2929 unsigned int page_nr = swap_header->info.badpages[i];
2930 if (page_nr == 0 || page_nr > swap_header->info.last_page)