函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memory-failure.c Create Date:2022-07-27 17:53:30
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:truncate_error_page

函数原型:static int truncate_error_page(struct page *p, unsigned long pfn, struct address_space *mapping)

返回类型:int

参数:

类型参数名称
struct page *p
unsigned longpfn
struct address_space *mapping
582  ret等于MF_FAILED
584  如果error_remove_page
585  err等于error_remove_page(mapping, p)
587  如果err不等于0则
588  打印信息("Memory failure: %#lx: Failed to punch page: %d\n", pfn, err)
592  打印信息("Memory failure: %#lx: failed to release buffers\n", pfn)
594  否则
595  ret等于MF_RECOVERED
597  否则
602  如果Safely invalidate one page from its pagecache mapping.* It only drops clean, unused pages. The page must be locked.* Returns 1 if the page is successfully invalidated, otherwise 0.ret等于MF_RECOVERED
604  否则打印信息("Memory failure: %#lx: Failed to invalidate\n", pfn)
609  返回:ret
调用者
名称描述
me_pagecache_cleanClean (or cleaned) page cache page.
me_huge_pageHuge pages. Needs work.* Issues:* - Error on hugepage is contained in hugepage unit (not in raw page unit.)* To narrow down kill region to one page, we need to break up pmd.