Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] ext4fs reliability bug

2009-03-20 by Vladimir Vassiliev

As I understand it's not violation of standards.

man fclose says
Note  that fclose() only flushes the user space buffers provided by the C library.  To ensure that the
       data is physically stored on disk the kernel buffers must be flushed too, for example, with sync(2) or
       fsync(2).

Problems arised with sequence 

open(newfile), 
write(newfile), 
close(newfile), 
rename(oldfile, newfile) 

which may leave us with empty file in ext4 when system crash occured. 

It will be useful to read blog of ext4's author.
http://thunk.org/tytso/blog/2009/03/12/delayed-allocation-and-the-zero-length-file-problem/
http://thunk.org/tytso/blog/2009/03/15/dont-fear-the-fsync/


-- 
Vladimir Vassiliev <vova@...>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.