Re: atomic file operations

Sergei Sharonov
2005-03-24T17:31:22Z

Artem B. Bityuckiy <dedekind <at> yandex.ru> 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