Bug in JFFS

Bjorn Wesen bjorn.wesen at axis.com
Fri Jun 16 16:17:37 EDT 2000

On Fri, 16 Jun 2000, Alexander Larsson wrote:
> We should use generic_file_write in jffs_file_operations instead of
> jffs_write_file. Then we should implement writepage, prepare_write and 
> commit_write in address_space_operations. These should look quite like
> jffs_write_file, so this wouldn't be hard.
> There is one problem here though. For each write the page of the file that
> is modified is read in, modified and written out in its entierty. This
> means several small writes to a file will become several 4Kb writes to the
> log.

That's why its unsymmetric from the beginning. It does not matter if the
OS reads pages or files, but it matters if it writes pages or passes on
writes directly. The latter is more or less required by JFFS design, while
the former is not. If you start involving page-based file i/o, you're back
at the block-based journaling that any other JFS uses, eventually.. but
with more overhead :) 

I thought we had correct page invalidation in the write mechanism. Did it
disappear in the 2.2/2.3 port or was it never there ? :) 


To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org

More information about the linux-mtd mailing list