函数逻辑报告 |
Source Code:mm\swapfile.c |
Create Date:2022-07-27 16:46:41 |
| Last Modify:2020-03-17 22:19:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:swapon tell device that all the old swap contents can be discarded,* to allow the swap device to optimize its wear-levelling.
函数原型:static int discard_swap(struct swap_info_struct *si)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct swap_info_struct * | si |
| 176 | err等于0 |
| 181 | nr_blocks等于nr_pages减1左移PAGE_SHIFT determines the page size 减9位 |
| 182 | 如果nr_blocks则 |
| 183 | err等于blkdev_issue_discard(swap device or bdev of swap file , start_block, nr_blocks, GFP_KERNEL, 0) |
| 187 | cond_resched() |
| 194 | err等于blkdev_issue_discard(swap device or bdev of swap file , start_block, nr_blocks, GFP_KERNEL, 0) |
| 199 | cond_resched() |
| 201 | 返回:err |
| 名称 | 描述 |
|---|---|
| SYSCALL_DEFINE2 |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |