atomic file operations

Sergei Sharonov sergei.sharonov at
Thu Mar 24 12:28:40 EST 2005

Artem B. Bityuckiy <dedekind <at>> writes:

> 1. write only 0-PAGE_SIZE bytes;
> 2. do not overlap n*PAGE_SIZE borders (n is 1,2, ...)
> 3. do fsync after write.
> Examples:
> (assume PAGE_SIZE is 4K)
> write 4K to offset 16K is OK
> write 1 byte anywhere is OK
> write 10 bytes at offset 4095 is not OK.

Artem, when figuring out if the write goes over the page boudary you did not say
anything about CRC and other non-user data.. Should it be taken into account 
too or am I missing something?

Sergei Sharonov

More information about the linux-mtd mailing list