| Function report | 
| Source Code: mm\swapfile.c | Create Date:2022-07-28 15:19:32 | 
| Last Modify:2020-03-17 22:19:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:read_swap_header
Proto:static unsigned long read_swap_header(struct swap_info_struct *p, union swap_header *swap_header, struct inode *inode)
Type:unsigned long
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct swap_info_struct * | p | |
| union swap_header * | swap_header | |
| struct inode * | inode | 
| 2948 | pr_err("Unable to find swap-space signature\n") | 
| 2949 | Return 0 | 
| 2956 | swab32s( & nr_badpages) | 
| 2957 | If nr_badpages > Max bad pages in the new format.. Then Return 0 | 
| 2963 | If version != 1 Then | 
| 2969 | dex of first free in swap_map = 1 | 
| 2970 | likely index for next allocation = 1 | 
| 2971 | countdown to next cluster search = 0 | 
| 2975 | If Not last_page Then | 
| 2976 | pr_warn("Empty swap-file\n") | 
| 2977 | Return 0 | 
| 2980 | pr_warn("Truncating oversized swap area, only using %luk out of %luk\n", maxpages << (PAGE_SHIFT determines the page size - 10), last_page << (PAGE_SHIFT determines the page size - 10)) | 
| 2990 | dex of last free in swap_map = maxpages - 1 | 
| 2992 | If Not maxpages Then Return 0 | 
| 2995 | If swapfilepages && maxpages > swapfilepages Then | 
| 2996 | pr_warn("Swap area shorter than signature indicates\n") | 
| 2997 | Return 0 | 
| 2999 | If nr_badpages && S_ISREG(i_mode) Then Return 0 | 
| 3001 | If nr_badpages > Max bad pages in the new format.. Then Return 0 | 
| 3004 | Return maxpages | 
| Name | Describe | 
|---|---|
| SYSCALL_DEFINE2 | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |