Synchronization of Inodes

sync_inodes synchronizes all dirty inodes. Its code flow diagram is shown in Figure 17-11.

Set_sb_syncing(oJ

__sync_inodeJ

wait set?

d Iterate over the superblocks of all filesystems mounted inuserland

Figure 17-11: Code flow diagram for sync_inodes.

sys_sync is a front end that directs the real synchronization performed in_sync_inodes. Before

_sync_inodes is called, the kernel uses set_sb_syncing to set the s_syncing element of struct super_block to 0 for all superblocks. This helps to avoid synchronization of superblocks from multiple places.

The_sync_inodes function iterates over all superblocks and invokes several methods for each block.

The function has one parameter:

Continue reading here: Fsfswritebackc

Was this article helpful?

0 0