[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Creation of holes in JFFS2
Hi,
While going thru JFFS2 source code, it seems like the function
int jffs2_prepare_write (struct file *filp, struct page *pg, unsigned start,
unsigned end) of file file.c
creates a jffs2_full_dnode to represent a hole in file. A hole is being
create in function
int jffs2_add_full_dnode_to_fraglist(struct jffs2_sb_info *c, struct
jffs2_node_frag **list, struct jffs2_full_dnode *fn) function of readinode.c
when a file write is being done at an offset which is greater than file end.
The latter function is being called from jffs2_add_full_dnode_to_inode()
which is called from jffs2_prepare_write().
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)
If anyone can throw some light on this, it would be great.
Thanks
Ravi
To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com