Red Hat Bugzilla – Bug 950691
xfs_repair emits "7f61c041b700: Badness in key lookup (length)"
Last modified: 2013-11-21 16:19:32 EST
xfs_repair sometimes emits "7f61c041b700: Badness in key lookup (length)" While this should be harmless, it's concerning to the user running xfs_repair. It's a result of get_agino_buf() reading in a full inode cluster's worth of data, and populating the cache with that length. Then i.e. pf_queuing_worker() reads the same block but with a shorter length, XFS_INODE_CLUSTER_SIZE(mp). Upstream this is gone simply because: 2b00e6325060e22b6a749abf0d7fc1ea50b1fd6 repair: do not walk the unlinked inode list removed the only caller of get_agino_buf(), so we never get the larger reads of the same block. We could possibly backport that commit, or alternately tell get_agino_buf() to read a smaller length, i.e.: diff --git a/repair/dinode.c b/repair/dinode.c index 5a2da39..442a82c 100644 --- a/repair/dinode.c +++ b/repair/dinode.c @@ -834,7 +834,7 @@ get_agino_buf(xfs_mount_t *mp, if ((irec = find_inode_rec(mp, agno, agino)) == NULL) return(NULL); - size = XFS_FSB_TO_BB(mp, MAX(1, XFS_INODES_PER_CHUNK/inodes_per_block)); + size = XFS_FSB_TO_BB(mp, MAX(1, XFS_INODE_CLUSTER_SIZE(mp) >> mp->m_sb.sb_blocklog)); bp = libxfs_readbuf(mp->m_dev, XFS_AGB_TO_DADDR(mp, agno, XFS_AGINO_TO_AGBNO(mp, irec->ino_startnum)), size, 0); if (!bp) { which I think is safe, but need to look at it a bit more.
Eric, having looked at teh patch in question, I think that back porting the patch is less risky that changing the logic in get_ino_buf(). Especially as the logic in get_agino_buf makes the assumption that all the inodes in a inobt record is in a single buffer, and your buffer length change makes that no longer true. -Dave.
Thanks Dave.
Built in xfsprogs-3.1.1-13.el6.src.rpm
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1657.html