Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\block_dev.c Create Date:2022-07-28 20:14:51
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:iterate_bdevs

Proto:void iterate_bdevs(void (*func)(struct block_device *, void *), void *arg)

Type:void

Parameter:

TypeParameterName
void (*func
void *arg
2240  struct inode * inode, * old_inode = NULL
2242  spin_lock( & s_inode_list_lock)
2244  mapping = i_mapping
2247  spin_lock( & _blocks, i_bytes, maybe i_size )
2248  If Misc & ( Set when inode is about to be freed but still has dirty pages or buffers attached or the inode itself is still dirty | Must be set when calling write_inode_now() if i_count is zero | Serves as both a mutex and completion notification) || nrpages == 0 Then
2250  spin_unlock( & _blocks, i_bytes, maybe i_size )
2251  Continue
2253  __iget(inode)
2254  spin_unlock( & _blocks, i_bytes, maybe i_size )
2255  spin_unlock( & s_inode_list_lock)
2264  put an inode
2265  old_inode = inode
2266  bdev = I_BDEV(inode)
2268  mutex_lock( & open/close mutex )
2269  If bd_openers Then func(bdev, arg)
2271  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.
2273  spin_lock( & s_inode_list_lock)
2275  spin_unlock( & s_inode_list_lock)
2276  put an inode
Caller
NameDescribe
ksys_syncSync everything. We start by waking flusher threads so that most of* writeback runs on all devices in parallel. Then we sync all inodes reliably* which effectively also waits for all flusher threads to finish doing* writeback
do_sync_work