函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\libfs.c Create Date:2022-07-29 10:41:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__generic_file_fsync - generic fsync implementation for simple filesystems*@file: file to synchronize*@start: start offset in bytes*@end: end offset in bytes (inclusive)*@datasync: only synchronize essential metadata if true* This is a generic

函数原型:int __generic_file_fsync(struct file *file, loff_t start, loff_t end, int datasync)

返回类型:int

参数:

类型参数名称
struct file *file
loff_tstart
loff_tend
intdatasync
996  inode等于host
1000  err等于le_write_and_wait_range - write out & wait on a file range*@file: file pointing to address_space with pages*@lstart: offset in bytes where the range starts*@lend: offset in bytes where the range ends (inclusive)
1001  如果err则返回:err
1004  inode_lock(inode)
1005  ret等于sync_mapping_buffers(i_mapping)
1006  如果非Misc 按位与I_DIRTY_ALL的值则转到:out
1008  如果datasync且非Misc 按位与I_DIRTY_DATASYNC的值则转到:out
1011  err等于sync_inode_metadata(inode, 1)
1012  如果ret恒等于0则ret等于err
1015  out :
1016  inode_unlock(inode)
1018  err等于le_check_and_advance_wb_err - report wb error (if any) that was previously* and advance wb_err to current one*@file: struct file on which the error is being reported* When userland calls fsync (or something like nfsd does the equivalent), we* want to
1019  如果ret恒等于0则ret等于err
1021  返回:ret
调用者
名称描述
generic_file_fsyncgeneric_file_fsync - generic fsync implementation for simple filesystems* with flush*@file: file to synchronize*@start: start offset in bytes*@end: end offset in bytes (inclusive)*@datasync: only synchronize essential metadata if true