]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_db: properly set inode type
authorEric Sandeen <sandeen@redhat.com>
Thu, 20 Jul 2017 15:51:46 +0000 (10:51 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 20 Jul 2017 15:51:46 +0000 (10:51 -0500)
commit533d1d229a881d5a58a232377c409a3dd7a5cd6f
treeaa5b77ccc39da93a43342dc2818252f97f86aeeb
parent4944defad4ae2cbcf056207490d7c597bb92cd7c
xfs_db: properly set inode type

When we set the type to "inode" the verifier validates multiple
inodes in the current fs block, so setting the buffer size to
that of just one inode is not sufficient and it'll emit spurious
verifier errors for all but the first, as we read off the end:

xfs_db> daddr 99
xfs_db> type inode
Metadata corruption detected at xfs_inode block 0x63/0x200
Metadata corruption detected at xfs_inode block 0x63/0x200
Metadata corruption detected at xfs_inode block 0x63/0x200
Metadata corruption detected at xfs_inode block 0x63/0x200
Metadata corruption detected at xfs_inode block 0x63/0x200
Metadata corruption detected at xfs_inode block 0x63/0x200
Metadata corruption detected at xfs_inode block 0x63/0x200

Use the special set_cur_inode() function for this purpose
as is done in inode_f().

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
[sandeen: remove nag/warning printf for now]
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/io.c