SYNC_INODES

Section: ()
Updated: 06 October 2005
Index Return to Main Contents

 

NAME

sync_inodes -  

SYNOPSIS

"SYNOPSIS"

void sync_inodes (int wait);  

ARGUMENTS

wait
-- undescribed --
 

DESCRIPTION

sync_inodes goes through each super block's dirty inode list, writes the inodes out, waits on the writeout and puts the inodes back on the normal list.

This is for sys_sync. fsync_dev uses the same algorithm. The subtle part of the sync functions is that the blockdev ``superblock'' is processed last. This is because the write_inode function of a typical fs will perform no I/O, but will mark buffers in the blockdev mapping as dirty. What we want to do is to perform all that dirtying first, and then write back all those inode blocks via the blockdev mapping in one sweep. So the additional (somewhat redundant) sync_blockdev calls here are to make sure that really happens. Because if we call sync_inodes_sb(wait=1) with outstanding dirty inodes, the writeback goes block-at-a-time within the filesystem's write_inode. This is extremely slow.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION

This document was created by man2html, using the manual pages.
Time: 13:31:54 GMT, October 06, 2005