函数逻辑报告 |
Source Code:mm\swapfile.c |
Create Date:2022-07-27 16:50:35 |
Last Modify:2020-03-17 22:19:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Verify that a swap entry is valid and increment its swap map count.* Returns error code in following case.* - success -> 0* - swp_entry is invalid -> EINVAL* - swp_entry is migration entry -> EINVAL
函数原型:static int __swap_duplicate(swp_entry_t entry, unsigned char usage)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
swp_entry_t | entry | |
unsigned char | usage |
3398 | offset等于Extract the `offset' field from a swp_entry_t. The swp_entry_t is in* arch-independent format |
3399 | ci等于Determine the locking method in use for this device. Return* swap_cluster_info if SSD-style cluster-based locking is in place. |
3409 | 转到:unlock_out |
3413 | count与等于Flag page is cached, in first swap_map 的反 |
3414 | err等于0 |
3416 | 如果usage恒等于Flag page is cached, in first swap_map 则 |
3428 | 如果count按位与See swap_map continuation for full count 的反的值小于Max duplication count, in first swap_map 则count加等于usage |
3430 | 否则如果count按位与See swap_map continuation for full count 的反的值大于Max duplication count, in first swap_map 则err等于负EINVAL |
3439 | vmalloc'ed array of usage counts [offset]等于count按位或has_cache |
3441 | unlock_out : |
3442 | unlock_cluster_or_swap_info(p, ci) |
3443 | out : |
3444 | 如果p则put_swap_device(p) |
3446 | 返回:err |
名称 | 描述 |
---|---|
swap_shmem_alloc | Help swapoff by noting that swap entry belongs to shmem/tmpfs* (in which case its reference count is never incremented). |
swap_duplicate | Increase reference count of swap entry by 1 |
swapcache_prepare | @entry: swap entry for which we allocate swap cache.* Called when allocating swap cache for existing swap entry,* This can return error codes. Returns 0 at success.* -EBUSY means there is a swap cache.* Note: return code is different from swap_duplicate(). |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |