函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Warn about a page cache invalidation failure during a direct I/O write.

函数原型:void dio_warn_stale_pagecache(struct file *filp)

返回类型:void

参数:

类型参数名称
struct file *filp
3148  DEFINE_RATELIMIT_STATE(_rs, 86400 * HZ, DEFAULT_RATELIMIT_BURST)
3150  inode等于file_inode(filp)
3153  seq_set - set a errseq_t for later reporting*@eseq: errseq_t field that should be set*@err: error to set (must be between -1 and -MAX_ERRNO)* This function sets the error in @eseq, and increments the sequence counter
3154  如果__ratelimit( & _rs)则
3155  path等于file_path(filp, pathname, pathname的长度)
3156  如果是错误path等于"(unknown)"
3158  打印错误信息("Page cache invalidation failure on direct I/O. Possible data corruption due to collision with buffered I/O!\n")
3159  打印错误信息("File: %s PID: %d Comm: %.20s\n", path, pid, comm)
调用者
名称描述
generic_file_direct_write
iomap_dio_complete
iomap_dio_rwmap_dio_rw() always completes O_[D]SYNC writes regardless of whether the IO* is being issued as AIO or not. This allows us to optimise pure data writes* to use REQ_FUA rather than requiring generic_write_sync() to issue a* REQ_FLUSH post write
dio_completedio_complete() - called when all DIO BIO I/O has been completed* This drops i_dio_count, lets interested parties know that a DIO operation* has completed, and calculates the resulting return code for the operation