]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
db: fix AGI ops definition in CRC type table
authorDave Chinner <dchinner@redhat.com>
Wed, 14 Oct 2015 00:05:23 +0000 (11:05 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 14 Oct 2015 00:05:23 +0000 (11:05 +1100)
commit293e343dc94297bcdf22e6d53c0550cd93aae3d4
tree030c9c7d96fecba00475b00e2feb7844744b8c34
parentc782bf02db94b08c770dce2c2ecb9762cd4a510f
db: fix AGI ops definition in CRC type table

The wrong buffer ops structure was added to the AGI field of the
type table when initially committed. This was not noticed because it
only affects manually setting the type of a buffer from xfs_db. e.g

xfs_db> agi 0
xfs_db> p
.....
crc = 0xbc58d757 (correct)
.....
xfs_db> fsb 2
xfs_db> type agi
Metadata CRC error detected at block 0x10/0x1000
xfs_db>

This is because (trimmed for clarity):

Breakpoint 1, xfs_verifier_error:
(gdb) bt
#0  xfs_verifier_error
#1  xfs_agfl_read_verify
#2  set_iocur_type
#3  type_f
#4  main

It's clear that the wrong verifier is being run (AGFL, not AGI).
The fix is simple.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
db/type.c