[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creation of holes in JFFS2

RTeli@xxxxxxx.com said:
>  This duplication is confusing.  I am assuming that before writing
> (i.e. calling jffs2_commit_write() jffs2_prepare_write is being called
> by vfs layer) 

In prepare_write() we write a real physical node to the flash to indicate 
that there is now a hole in the file. In add_full_dnode_to_fraglist, we add 
only a marker in our list. 

We have to do the former to deal with the problems which may arise from 
truncating files, then extending them with holes in - we have to make sure 
that the old data don't 'show through' the holes. 

This means that the hole markers which we add to the list in the latter 
function shouldn't actually exist during normal operation - only while 
we're scanning the filesystem and haven't yet found all the physical nodes 
belonging to the inode in question.


To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com