函数逻辑报告 |
Source Code:fs\dax.c |
Create Date:2022-07-29 10:56:32 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:dax_iomap_pte_fault
函数原型:static vm_fault_t dax_iomap_pte_fault(struct vm_fault *vmf, pfn_t *pfnp, int *iomap_errp, const struct iomap_ops *ops)
返回类型:vm_fault_t
参数:
类型 | 参数 | 名称 |
---|---|---|
struct vm_fault * | vmf | |
pfn_t * | pfnp | |
int * | iomap_errp | |
const struct iomap_ops * | ops |
1253 | pos等于pgoff左移PAGE_SHIFT determines the page size 位 |
1254 | struct iomap iomap = { type of mapping = blocks allocated, need allocation } |
1255 | struct iomap srcmap = { type of mapping = blocks allocated, need allocation } |
1256 | flags等于mapping for page fault |
1257 | major等于0 |
1258 | write等于flags按位与Fault was a write access |
1260 | ret等于0 |
1264 | trace_dax_pte_fault(inode, vmf, ret) |
1271 | ret等于VM_FAULT_SIGBUS |
1272 | 转到:out |
1275 | 如果write且非cow_page则flags或等于writing, must allocate blocks |
1280 | ret等于xa_to_internal() - Extract the value from an internal entry.*@entry: XArray entry.* Context: Any context.* Return: The value which was stored in the internal entry. |
1281 | 转到:out |
1290 | 如果pmd_trans_huge( * pmd)或pmd_devmap( * pmd)则 |
1291 | ret等于VM_FAULT_NOPAGE |
1292 | 转到:unlock_entry |
1301 | 如果iomap_errp则iomap_errp等于error |
1303 | 如果error则 |
1304 | ret等于dax_fault_return(error) |
1305 | 转到:unlock_entry |
1307 | 如果WARN_ON_ONCE( file offset of mapping, bytes + length of mapping, bytes < pos + PAGE_SIZE)则 |
1309 | 转到:error_finish_iomap |
1312 | 如果cow_page则 |
1313 | sector等于dax_iomap_sector( & iomap, pos) |
1320 | 当: type of mapping 恒等于locks allocated at @addr |
1321 | error等于copy_user_dax( block device for I/O , dax_dev for dax operations , sector, PAGE_SIZE, cow_page, vaddr) |
1323 | 退出 |
1324 | 默认 |
1330 | 如果error则转到:error_finish_iomap |
1333 | __SetPageUptodate(cow_page) |
1335 | 如果非ret则ret等于VM_FAULT_DONE_COW |
1337 | 转到:finish_iomap |
1340 | sync等于MAP_SYNC on a dax mapping guarantees dirty metadata is* flushed on write-faults (non-cow), but not read-faults. |
1343 | 当: type of mapping 恒等于locks allocated at @addr |
1345 | Disable counters |
1347 | major等于VM_FAULT_MAJOR |
1350 | 如果error小于0则转到:error_finish_iomap |
1353 | entry等于By this point grab_mapping_entry() has ensured that we have a locked entry* of the appropriate size so we don't have to worry about downgrading PMDs to* PTEs |
1362 | 如果sync则 |
1363 | 如果WARN_ON_ONCE(!pfnp)则 |
1365 | 转到:error_finish_iomap |
1368 | ret等于VM_FAULT_NEEDDSYNC按位或major |
1369 | 转到:finish_iomap |
1371 | trace_dax_insert_mapping(inode, vmf, entry) |
1372 | 如果write则ret等于If the insertion of PTE failed because someone else already added a* different entry in the mean time, we treat that as success as we assume* the same entry was actually inserted. |
1374 | 否则ret等于vmf_insert_mixed(vma, vaddr, pfn) |
1377 | 转到:finish_iomap |
1380 | 如果非write则 |
1385 | 默认 |
1391 | error_finish_iomap : |
1392 | ret等于dax_fault_return(error) |
1393 | finish_iomap : |
1394 | 如果iomap_end则 |
1397 | 如果ret按位与VM_FAULT_ERROR则copied等于0 |
1407 | unlock_entry : |
1409 | out : |
1410 | trace_dax_pte_fault_done(inode, vmf, ret) |
名称 | 描述 |
---|---|
dax_iomap_fault | dax_iomap_fault - handle a page fault on a DAX file*@vmf: The description of the fault*@pe_size: Size of the page to fault in*@pfnp: PFN to insert for synchronous faults if fsync is required*@iomap_errp: Storage for detailed error code in case of |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |