atomic file operations
Artem B. Bityuckiy
dedekind at infradead.org
Thu Mar 24 07:17:41 EST 2005
> Hi Artem,
> This is not what I understand from jffs2_write_inode_range.
> When you reach the end of the block your data may be split at
> any offset because jffs2_reserve_space may return more than
> JFFS2_MIN_DATA_LEN but less than the data size (or not enough
> space to compress the whole input buffer if you use compression).
> Or is there some trick here that I don't understand ??
Hmm, yes, you're right. jffs2_write_inode_range may do further splits. I
haven't mentioned this. I thought on the higher level - commit_write is
called only once for the transactions I mentioned. But even in these cases
jffs2_write_inode_range spoils the atomicity.
Then I must add one more requirement:
4. Transactions must be <= 128 bytes.
Or JFFS2_MIN_DATA_LEN should be re-defined.
Thus, some atomic writes are still possible :-)
Better now? :-)
Artem B. Bityuckiy,
More information about the linux-mtd