函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:The @s_sync_lock is used to serialise concurrent sync operations* to avoid lock contention problems with concurrent wait_sb_inodes() calls.* Concurrent callers will block on the s_sync_lock rather than doing contending* walks

函数原型:static void wait_sb_inodes(struct super_block *sb)

返回类型:void

参数:

类型参数名称
struct super_block *sb
2367  LIST_HEAD(sync_list)
2373  WARN_ON(!In all implementations count != 0 means locked )
2375  mutex_lock( & s_sync_lock)
2386  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
2387  spin_lock_irq( & s_inode_wblist_lock)
2388  加入二个链表项并重新初始化
2397  当非链表为空循环
2398  inode等于list_first_entry - get the first element from a list*@ptr: the list head to take the element from.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.* Note, that list is expected to be not empty.( & sync_list, structinode, i_wb_list)
2400  mapping等于i_mapping
2408  链表项移动到尾部
2415  如果非Returns true if any of the pages in the mapping are marked with the tag.则继续下一循环
2418  spin_unlock_irq( & s_inode_wblist_lock)
2420  加自旋锁
2421  如果Misc 按位与I_FREEING按位或I_WILL_FREE按位或I_NEW的值则
2425  继续下一循环
2427  __iget(inode)
2428  自旋锁解锁
2429  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
2436  lemap_fdatawait_keep_errors - wait for writeback without clearing errors*@mapping: address space structure to wait for* Walk the list of under-writeback pages of the given address space* and wait for all of them. Unlike filemap_fdatawait(), this function
2438  cond_resched()
2440  放置一个索引节点
2442  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
2443  spin_lock_irq( & s_inode_wblist_lock)
2445  spin_unlock_irq( & s_inode_wblist_lock)
2446  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
2447  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
调用者
名称描述
sync_inodes_sbsync_inodes_sb - sync sb inode pages*@sb: the superblock* This function writes and waits on any dirty inode belonging to this* super_block.