Function report |
Source Code:mm\swapfile.c |
Create Date:2022-07-28 15:18:45 |
| Last Modify:2020-03-17 22:19:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Add a block range (and the corresponding page range) into this swapdev's* extent tree.* This function rather assumes that it is called in ascending page order.
Proto:int add_swap_extent(struct swap_info_struct *sis, unsigned long start_page, unsigned long nr_pages, sector_t start_block)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct swap_info_struct * | sis | |
| unsigned long | start_page | |
| unsigned long | nr_pages | |
| sector_t | start_block |
| 2327 | If parent Then |
| 2328 | se = rb_entry(parent, structswap_extent, rb_node) |
| 2329 | BUG_ON(start_page + nr_pages != start_page) |
| 2330 | If start_block + nr_pages == start_block Then |
| 2338 | new_se = kmalloc( size of se , GFP_KERNEL) |
| 2341 | start_page = start_page |
| 2343 | start_block = start_block |
| 2345 | rb_link_node( & rb_node, parent, link) |
| 2346 | rb_insert_color( & rb_node, & of the swap extent rbtree ) |
| 2347 | Return 1 |
| Name | Describe |
|---|---|
| generic_swapfile_activate | |
| setup_swap_extents | A `swap extent' is a simple thing which maps a contiguous range of pages* onto a contiguous range of disk blocks. An ordered list of swap extents* is built at swapon time and is then used at swap_writepage/swap_readpage |
| iomap_swapfile_add_extent | Collect physical extents for this swap file. Physical extents reported to* the swap code must be trimmed to align to a page boundary. The logical* offset within the file is irrelevant since the swapfile code maps logical |
| 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 |