Some questions about page cache

From: Hao-Ran Liu
Date: Fri Dec 24 2004 - 00:21:59 EST


Dear All,

I read kernel 2.6.9 page cache code and have some questions.

1. Is the call to filemap_fdatawrite() in sys_fsync() redundant? Since
sys_fsync() will call file->f_op->fsync(), and, both filemap_fdatawrite()and
file->f_op->fsync() (ext2, for example) eventually call do_writepages()
function.

2. for ext2, the purpose of sync_mapping_buffers() is to write out all
indirect blocks of an address_space, which is called by ext2_sync_file().
How do these buffers got synced when a user program called sys_sync()? I
don't find any call to ext2_sync_file() by sys_sync(). If
sync_mapping_buffers() is not needed for sys_sync(), then this should apply
for ext2_sync_file(), too?

Regards,
Hao-Ran Liu



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/