Examining Superblock Inodes
Once it has been established with the help of the superblock structure that the filesystem contains inodes with dirty data, the kernel hands over to sync_sb_inodes, which synchronizes the dirty superblock inodes. The code flow diagram is in Figure 17-6.
Great effort would be needed if the kernel were to run through the complete list of filesystem inodes each time in order to differentiate between clean and dirty inodes. The kernel therefore implements a far less costly option by placing all dirty inodes on the superblock-specific list super_block->s_dirty. Notice that inodes on the list are reverse time-ordered. The later an inode was dirtied, the closer it is to the tail of the list.
Two more list heads are additionally required to perform the synchronization of these inodes. The relevant portion of the super_block structure is as follows:
Continue reading here: Info
Was this article helpful?