From: Barry Naujok Date: Thu, 19 Oct 2006 03:58:36 +0000 (+0000) Subject: Fix LEAFN node level is 1 bogus warning in xfs_repair X-Git-Tag: v2.9.0~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f336d89065c5efe40622bacc10f4f2152b42b84;p=thirdparty%2Fxfsprogs-dev.git Fix LEAFN node level is 1 bogus warning in xfs_repair Merge of master-melb:xfs-cmds:27238a by kenmcd. Bump version to 2.8.15 --- diff --git a/VERSION b/VERSION index 9461c90c6..23a00e0ba 100644 --- a/VERSION +++ b/VERSION @@ -3,5 +3,5 @@ # PKG_MAJOR=2 PKG_MINOR=8 -PKG_REVISION=14 +PKG_REVISION=15 PKG_BUILD=1 diff --git a/doc/CHANGES b/doc/CHANGES index a45924b72..11d472f9e 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -1,3 +1,7 @@ +xfsprogs-2.8.15 (19 October 2006) + - Fix up nlink checks and repairs in phase 7 for xfs_repair. + - Remove a bogus LEAFN warning for a single leaf node v2 dir. + xfsprogs-2.8.14 (6 October 2006) - Fix up the ring command in xfs_db, thanks to Utako Kusaka diff --git a/repair/dir2.c b/repair/dir2.c index a6438a060..4687c7b9d 100644 --- a/repair/dir2.c +++ b/repair/dir2.c @@ -258,6 +258,7 @@ traverse_int_dir2block(xfs_mount_t *mp, xfs_dabuf_t *bp; int i; int nex; + xfs_da_blkinfo_t *info; xfs_da_intnode_t *node; bmap_ext_t lbmp; @@ -268,7 +269,7 @@ traverse_int_dir2block(xfs_mount_t *mp, */ bno = mp->m_dirleafblk; i = -1; - node = NULL; + info = NULL; da_cursor->active = 0; do { @@ -291,33 +292,28 @@ traverse_int_dir2block(xfs_mount_t *mp, goto error_out; } - node = bp->data; + info = bp->data; - if (INT_GET(node->hdr.info.magic, ARCH_CONVERT) == + if (INT_GET(info->magic, ARCH_CONVERT) == XFS_DIR2_LEAFN_MAGIC) { if ( i != -1 ) { do_warn(_("found non-root LEAFN node in inode " "%llu bno = %u\n"), da_cursor->ino, bno); } - if (INT_GET(node->hdr.level, ARCH_CONVERT) >= 1) { - do_warn(_("LEAFN node level is %d inode %llu " - "bno = %u\n"), - INT_GET(node->hdr.level, ARCH_CONVERT), - da_cursor->ino, bno); - } *rbno = 0; da_brelse(bp); return(1); - } else if (INT_GET(node->hdr.info.magic, ARCH_CONVERT) != + } else if (INT_GET(info->magic, ARCH_CONVERT) != XFS_DA_NODE_MAGIC) { da_brelse(bp); do_warn(_("bad dir magic number 0x%x in inode %llu " "bno = %u\n"), - INT_GET(node->hdr.info.magic, ARCH_CONVERT), + INT_GET(info->magic, ARCH_CONVERT), da_cursor->ino, bno); goto error_out; } + node = (xfs_da_intnode_t*)info; if (INT_GET(node->hdr.count, ARCH_CONVERT) > mp->m_dir_node_ents) { da_brelse(bp); @@ -327,7 +323,6 @@ traverse_int_dir2block(xfs_mount_t *mp, mp->m_dir_node_ents); goto error_out; } - /* * maintain level counter */ @@ -356,7 +351,7 @@ traverse_int_dir2block(xfs_mount_t *mp, * set up new bno for next level down */ bno = INT_GET(node->btree[0].before, ARCH_CONVERT); - } while (node != NULL && i > 1); + } while (info != NULL && i > 1); /* * now return block number and get out