kernels/linux-2.4.0/mm/filemap.c
/*
 * Two-stage data sync: first start the IO, then go back and
 * collect the information..
 */
Two-stage data sync: first start the IO, then go back and
collect the information
Two - stage data sync : first start the IO then go back and collect the information
int generic_buffer_fdatasync(struct inode *inode, unsigned long start_idx, unsigned long end_idx)
{
	int retval;
	retval = do_buffer_fdatasync(&inode->i_mapping->dirty_pages, start_idx, end_idx, writeout_one_page);
	retval |= do_buffer_fdatasync(&inode->i_mapping->clean_pages, start_idx, end_idx, writeout_one_page);
	retval |= do_buffer_fdatasync(&inode->i_mapping->locked_pages, start_idx, end_idx, writeout_one_page);
	retval |= do_buffer_fdatasync(&inode->i_mapping->dirty_pages, start_idx, end_idx, writeout_one_page);
	retval |= do_buffer_fdatasync(&inode->i_mapping->clean_pages, start_idx, end_idx, waitfor_one_page);
	retval |= do_buffer_fdatasync(&inode->i_mapping->locked_pages, start_idx, end_idx, waitfor_one_page);
	return retval;
}
int generic_buffer_fdatasync ( struct inode * inode , unsigned long start_idx , unsigned long end_idx ) { int retval ; retval = do_buffer_fdatasync ( & inode -> i_mapping -> dirty_pages , start_idx , end_idx , writeout_one_page ) ; retval |= do_buffer_fdatasync ( & inode -> i_mapping -> clean_pages , start_idx , end_idx , writeout_one_page ) ; retval |= do_buffer_fdatasync ( & inode -> i_mapping -> locked_pages , start_idx , end_idx , writeout_one_page ) ; retval |= do_buffer_fdatasync ( & inode -> i_mapping -> dirty_pages , start_idx , end_idx , writeout_one_page ) ; retval |= do_buffer_fdatasync ( & inode -> i_mapping -> clean_pages , start_idx , end_idx , waitfor_one_page ) ; retval |= do_buffer_fdatasync ( & inode -> i_mapping -> locked_pages , start_idx , end_idx , waitfor_one_page ) ; return retval ; }
Two-stage data sync: first start the IO, then go back and
 collect the information..
Two - stage data sync : first start the IO then go back and collect the information ..
/* writeout dirty buffers on pages from both clean and dirty lists */ /* now wait for locked buffers on pages from both clean and dirty lists */