mbox series

[v6,00/12] xfs_repair: use btree bulk loading

Message ID 159107201290.315004.4447998785149331259.stgit@magnolia (mailing list archive)
Headers show
Series xfs_repair: use btree bulk loading | expand

Message

Darrick J. Wong June 2, 2020, 4:26 a.m. UTC
Hi all,

In preparation for landing the online fs repair feature, it was
necessary to design a generic btree bulk loading module that it could
use.  Fortunately, xfs_repair has four of these (for the four btree
types), so I synthesized one generic version and pushed it into the
kernel libxfs in 5.7.

That being done, port xfs_repair to use the generic btree bulk loader.
In addition to dropping a lot of code from xfs_repair, this also enables
us to control the fullness of the tree nodes in the rebuilt indices for
testing.

For v5 I rebased the support code from my kernel tree, and fixed some
of the more obvious warts that Brian found in v4.

For v6 I shortened function prefixes, stripped out all the code that
wasn't strictly necessary, and moved the new code to a separate file
so that phase5.c will be less cluttered.

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything.  Enjoy!
Comments and questions are, as always, welcome.

--D

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=repair-bulk-load
---
 include/libxfs.h         |    1 
 libxfs/libxfs_api_defs.h |    8 
 repair/Makefile          |    4 
 repair/agbtree.c         |  659 +++++++++++++
 repair/agbtree.h         |   62 +
 repair/bulkload.c        |  134 +++
 repair/bulkload.h        |   59 +
 repair/phase5.c          | 2397 ++++------------------------------------------
 repair/xfs_repair.c      |   17 
 9 files changed, 1164 insertions(+), 2177 deletions(-)
 create mode 100644 repair/agbtree.c
 create mode 100644 repair/agbtree.h
 create mode 100644 repair/bulkload.c
 create mode 100644 repair/bulkload.h