Re: [PATCH 11/8] xfs_repair: don't corrupt a attr fork da3 node when clearing forw/back

Christoph Hellwig
2020-01-30T18:22:32Z

While this looks functionally correct, I think the structure in
here is weird. In libxfs we usually check that magic number first
and then branch out into helper that deal with the leaf vs node
format. That is we don't do the xfs_attr3_leaf_hdr_from_disk call
for node format attrs, and also check the forward/backward pointers
based on the actual ichdr. Maybe this code should follow that
structure?