No page cache write buffering in jffs2

Sookwan Lee sklee at ssrnet.snu.ac.kr
Thu Aug 9 02:18:10 EDT 2007


Hi.

I want to know why there is no .writepage method in
jffs2_file_address_operations.

I think that generally file write is delayed in page cache until
periodic dirty page cache flushing by pdflush or forced sync like sys_sync.

For example, in ext2, generic_commit_write (ie. ext2_aops->commit_write)
just marks the page cache dirty and does not issue disk traffic,
and later, pdflush actually flushes dirty pages using ext2_writepages
(ie. ext2_aops->writepage).

jffs2_file_address_operations defines prepare_write and commit_write but
no writepage method, and seems to me that actual flash write occures in
jffs2_commit_write.

It seems that when files are updated frequently, it cannot benefit from
page cache buffering.

Is it intentional? Is it because jffs2 is widely used in mobile devices,
so to survice unexpected power loss, all file writes should reach
flash media immediately?

Thanks in advance.

-- 
Sookwan Lee



More information about the linux-mtd mailing list