AFFS preallocates few blocks per inode as an optimisation. Unfortunately there is a race condition and the same blocks ends up being allocated for both data and metadata, metadata gets overwritten and so the file is partially unreadable. Here is a fix. Please indicate if this isn't the right place to submit this or my previous fs-related patches. -- Regards Vladimir 'φ-coder/phcoder' Serbinenko