函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Write out an inode's dirty pages. Either the caller has an active reference* on the inode or the inode has I_WILL_FREE set.* This function is designed to be called for writing back one inode which* we go e

函数原型:static int writeback_single_inode(struct inode *inode, struct writeback_control *wbc)

返回类型:int

参数:

类型参数名称
struct inode *inode
struct writeback_control *wbc
1531  ret等于0
1533  加自旋锁
1534  如果非atomic_read( & i_count)则WARN_ON(!(Misc & (I_WILL_FREE | I_FREEING)))
1536  否则WARN_ON(Misc & I_WILL_FREE)
1539  如果Misc 按位与I_SYNC
1540  如果sync_mode不等于Wait on every mapping 则转到:out
1547  Wait for writeback on an inode to complete. Called with i_lock held.* Caller must make sure inode cannot go away when we drop i_lock.
1549  WARN_ON(Misc & I_SYNC)
1558  如果非Misc 按位与I_DIRTY_ALL的值且sync_mode不等于Wait on every mapping 或非Returns true if any of the pages in the mapping are marked with the tag.的值则转到:out
1562  Misc 或等于I_SYNC
1563  wbc_attach_and_unlock_inode(wbc, inode)
1565  ret等于Write out an inode and its dirty pages. Do not update the writeback list* linkage. That is left to the caller. The caller is also responsible for* setting I_SYNC flag and calling inode_sync_complete() to clear it.
1567  wbc_detach_inode(wbc)
1569  wb等于inode_to_wb_and_lock_list(inode)
1570  加自旋锁
1575  如果非Misc 按位与I_DIRTY_ALL的值则de_io_list_del_locked - remove an inode from its bdi_writeback IO list*@inode: inode to be removed*@wb: bdi_writeback @inode is being removed from* Remove @inode which may be on one of @wb->b_{dirty|io|more_io} lists and
1577  自旋锁解锁
1578  inode_sync_complete(inode)
1579  out :
1580  自旋锁解锁
1581  返回:ret
调用者
名称描述
write_inode_nowwrite_inode_now - write an inode to disk*@inode: inode to write to disk*@sync: whether the write should be synchronous or not* This function commits an inode to disk immediately if it is dirty. This is* primarily needed by knfsd.
sync_inodesync_inode - write an inode and its pages to disk.*@inode: the inode to sync*@wbc: controls the writeback mode* sync_inode() will write an inode and its pages to disk. It will also* correctly update the inode on its superblock's dirty inode lists and will