]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: set rsumino version to 2
authorEric Sandeen <sandeen@redhat.com>
Tue, 21 Jun 2016 02:55:15 +0000 (12:55 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 21 Jun 2016 02:55:15 +0000 (12:55 +1000)
commit643f6acc4bb2d799bebd54c973949c1a90eb26a3
tree20fbaef442568a41acb7eeb3dec73cfa45ba3faa
parent587636b1418df1a3dd1e1bbd3f6f35a56eec332c
xfs_repair: set rsumino version to 2

If we run xfs/033 with "-m crc=0", the test fails with a repair
output difference:

     Phase 7 - verify and correct link counts...
    +resetting inode INO nlinks from 0 to 1
     done

This is because when we zero out the realtime summary inode and
rebuild it, we set its version to 1, then set its ip->i_d.di_nlink
to 1.  This is a little odd, because v1 inodes store their link
count in di_onlink...

Then, later in repair we call xfs_inode_from_disk(), which sees the
version one inode, and converts it to version 2 in part by copying
di_onlink to di_nlink.  But we never *set* di_onlink, so di_nlink
gets reset to zero, and this error is discovered later in repair.

Interestingly, mk_rbmino() was changed in 138659f1 to set version 2;
it looks like mk_rsumino was just missed.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
repair/phase6.c