Hi all, This series uses the atomic extent swapping code to enable safe reconstruction of the realtime summary file. First, we enable online repair to allocate a temporary file on the filesystem that can be used by online repair to stage reconstructed metadata. Next, we walk the realtime bitmap to compute a new summary in this temporary file. Finally, we swap the contents of the two files with the atomic extent swap feature. 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-rtsummary xfsprogs git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=repair-rtsummary --- fs/xfs/Makefile | 4 fs/xfs/scrub/repair.c | 315 +++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/repair.h | 19 ++ fs/xfs/scrub/rtsummary.c | 22 +++ fs/xfs/scrub/rtsummary_repair.c | 65 ++++++++ fs/xfs/scrub/scrub.c | 8 + fs/xfs/scrub/scrub.h | 4 fs/xfs/xfs_export.c | 2 fs/xfs/xfs_inode.c | 3 fs/xfs/xfs_inode.h | 1 fs/xfs/xfs_itable.c | 8 + fs/xfs/xfs_xchgrange.c | 2 fs/xfs/xfs_xchgrange.h | 2 13 files changed, 447 insertions(+), 8 deletions(-) create mode 100644 fs/xfs/scrub/rtsummary_repair.c