]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
Revert "xfs_repair: treat zero da btree pointers as corruption"
authorDave Chinner <dchinner@redhat.com>
Tue, 30 Oct 2018 21:54:59 +0000 (16:54 -0500)
committerEric Sandeen <sandeen@redhat.com>
Tue, 30 Oct 2018 21:54:59 +0000 (16:54 -0500)
commit71a6af8568127a546b282267e20653631a486cd6
tree048f084ba1b019e93cef10a0889f187cdbabf95c
parent99a5535c53b0e8db38d15f52c859d52ac2f29723
Revert "xfs_repair: treat zero da btree pointers as corruption"

This reverts commit 67a79e2cc9320aaf269cd00e9c8d16892931886d.

A root LEAFN block can exist in a directory. When we convert from
leaf format (LEAF1 - internal free list) to node format (LEAFN -
external free list) the only change to the single root leaf block is
that it's magic number is changed from LEAF1 to LEAFN.

We don't actually end up with DA nodes in the tree until the LEAFN
node is split, and that requires a couple more dirents to be added
to the directory to fill the LEAFN block up completely. Then it will
split and create a DA node root block pointing to multiple LEAFN
leaf blocks.

Hence restore the old behaviour where we skip the DA node tree
rebuild if there is a LEAFN root block found as there is no tree to
rebuild.

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