static void _sync_inodes(int wait)

wait is a Boolean variable that decides if the kernel should wait for write operations to finish or not. Recall from above that this behavior is essential for the sync system call.

This is what_sync_inodes does:

□ If the superblock is currently being synchronized from another part of the kernel (i.e., if s_syncing of struct super_block is set), it is skipped. Otherwise, s_syncing is set to 1 to signal that this superblock is being synchronized to other places in the kernel.

□ sync_inodes_sb synchronizes all dirty inodes associated with the superblock. The current page state is queried with get_page_state, and then the function creates an instance of writeback_control. There, the value of nr_to_write (maximum number of pages to be written) is set as follows:

Continue reading here: Fsfswritebackc

Was this article helpful?

0 0