On Mon, May 27, 2013 at 04:38:27PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> The inode unlinked list manipulations operate directly on the inode
> buffer, and so bypass the inode CRC calculation mechanisms. Hence an
> inode on the unlinked list has an invalid CRC. Fix this by
> recalculating the CRC whenever we modify an unlinked list pointer in
> an inode. This is trivial to do, and the new CRC gets logged with
> the inode core so on replay of the unlinked list operations this
> will be updated as expected and remain consistent.
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
I need to rework this fix.
The fact that it actually requires log recovery to follow it's
documented recovery ordering constraints has exposed a bug in those
the log recovery transaction item re-ordering code. The bug has
been there since inode chunk deletion was introduced in 2003.
It has also shown up that there is no guarantee that the on-disk
inode in the buffer is actually uptodate, so recording the CRC in
the transaction for recovery is the wrong thing to do because it may
be different to what recovery ends up with after reordering all the
modifications. So the correct thing to do is to have recovery
recalculate the on-disk inode CRC are modifying the unlinked list...
So, there's 2-3 patches that need to replace this one....
Thank xfs/121 and the icreate patch set for finding this mess.