Hi all, Before we start merging the online repair functions, let's improve the bulk loading code a bit. First, we need to fix a misinteraction between the AIL and the btree bulkloader wherein the delwri at the end of the bulk load fails to queue a buffer for writeback if it happens to be on the AIL list. Second, we introduce EFIs in the btree bulkloader block allocator to to guarantee that staging blocks are freed if the filesystem goes down before committing the new btree. Third, we change the bulkloader itself to copy multiple records into a block if possible, and add some debugging knobs so that developers can control the slack factors, just like they can do for xfs_repair. 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 kernel git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=repair-prep-for-bulk-loading xfsprogs git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=repair-prep-for-bulk-loading --- libxfs/libxfs_api_defs.h | 1 libxfs/libxfs_io.h | 11 +++ libxfs/xfs_btree.c | 2 libxfs/xfs_btree.h | 3 + libxfs/xfs_btree_staging.c | 67 +++++++++++----- libxfs/xfs_btree_staging.h | 32 +++++--- repair/agbtree.c | 182 ++++++++++++++++++++++++++++---------------- 7 files changed, 198 insertions(+), 100 deletions(-)