database copying and compacting

Matthias Andree matthias.andree at gmx.de
Fri Nov 19 18:38:01 CET 2004


"Pavel Kankovsky" <peak at argo.troja.mff.cuni.cz> writes:

> The bad news is the Linux kernel (at least late 2.4 and 2.6) violates this
> guarantee, ie. it does not make sure writes are atomic wrt reads (but it
> makes sure they are atomic wrt other writes). This is, of course, a
> violation of POSIX. I was ignored when I pointed it out on LKML (see
> "Linux kernel file offset pointer races" in August, esp. my post from Aug
> 12). As far as I can tell, interleaving of reads and writes can happen
> even in the middle of a page. :P

Proper file system atomicity and synchronous completion semantics even
when there is no reasonable workaround are a sore spot that Linux kernel
developers simply don't care about. Linux still has not grown up. And
that's why BerkeleyDB 4.1 and newer are recommended - to detect broken
pages in the database. The alternative would be to use 512 bytes per
block, which is probably detrimental to performance.

-- 
Matthias Andree



More information about the Bogofilter mailing list