| Function report | 
| Source Code: kernel\power\swap.c | Create Date:2022-07-28 10:02:26 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:swap_write_page
Proto:static int swap_write_page(struct swap_map_handle *handle, void *buf, struct hib_bio_batch *hb)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct swap_map_handle * | handle | |
| void * | buf | |
| struct hib_bio_batch * | hb | 
| 443 | error = 0 | 
| 448 | offset = alloc_swapdev_block - allocate a swap page and register that it has* been allocated, so that it can be freed in case of an error. | 
| 449 | error = write_page - Write one page to given swap location.*@buf: Address we're writing.*@offset: Offset of the swap page we're writing to.*@hb: bio completion batch | 
| 454 | offset = alloc_swapdev_block - allocate a swap page and register that it has* been allocated, so that it can be freed in case of an error. | 
| 458 | error = write_page - Write one page to given swap location.*@buf: Address we're writing.*@offset: Offset of the swap page we're writing to.*@hb: bio completion batch | 
| 461 | clear_page(cur) | 
| 463 | k = 0 | 
| 465 | If hb && Number of free pages that are not high. <= reqd_free_pages Then | 
| 476 | out : | 
| 477 | Return error | 
| Name | Describe | 
|---|---|
| save_image | save_image - save the suspend image data | 
| save_image_lzo | save_image_lzo - Save the suspend image data compressed with LZO.*@handle: Swap map handle to use for saving the image.*@snapshot: Image to read data from.*@nr_to_write: Number of pages to save. | 
| swsusp_write | swsusp_write - Write entire image and metadata.*@flags: flags to pass to the "boot" kernel in the image header* It is important _NOT_ to umount filesystems at this point. We want* them synced (in case something goes wrong) but we DO not want to mark | 
| 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 |