Hi all, These are all the patches that I needed to backport from the online fsck patchset to start writing online fsck for parent pointers and directories. IOWS, we're blatantly copying things from the online repair part 1 megaseries; this is what online repair part 2 requires. 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. kernel git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=pptrs-online-fsck-backports xfsprogs git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=pptrs-online-fsck-backports --- fs/xfs/Kconfig | 38 +++ fs/xfs/Makefile | 11 + fs/xfs/libxfs/xfs_dir2.c | 6 fs/xfs/libxfs/xfs_dir2.h | 1 fs/xfs/scrub/agheader_repair.c | 99 +++++--- fs/xfs/scrub/bitmap.c | 389 ++++++++++++++++++++------------ fs/xfs/scrub/bitmap.h | 35 ++- fs/xfs/scrub/bmap.c | 6 fs/xfs/scrub/common.c | 133 ++++++++--- fs/xfs/scrub/common.h | 10 + fs/xfs/scrub/dir.c | 233 ++++++------------- fs/xfs/scrub/inode.c | 6 fs/xfs/scrub/iscan.c | 483 ++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/iscan.h | 65 +++++ fs/xfs/scrub/listxattr.c | 314 ++++++++++++++++++++++++++ fs/xfs/scrub/listxattr.h | 17 + fs/xfs/scrub/parent.c | 290 ++++++++++-------------- fs/xfs/scrub/quota.c | 9 - fs/xfs/scrub/readdir.c | 375 +++++++++++++++++++++++++++++++ fs/xfs/scrub/readdir.h | 19 ++ fs/xfs/scrub/repair.c | 102 +++++--- fs/xfs/scrub/rtbitmap.c | 11 - fs/xfs/scrub/scrub.c | 23 ++ fs/xfs/scrub/scrub.h | 7 + fs/xfs/scrub/tempfile.c | 243 ++++++++++++++++++++ fs/xfs/scrub/tempfile.h | 29 ++ fs/xfs/scrub/trace.c | 5 fs/xfs/scrub/trace.h | 272 +++++++++++++++++++++++ fs/xfs/scrub/xfarray.c | 394 +++++++++++++++++++++++++++++++++ fs/xfs/scrub/xfarray.h | 60 +++++ fs/xfs/scrub/xfblob.c | 176 +++++++++++++++ fs/xfs/scrub/xfblob.h | 27 ++ fs/xfs/scrub/xfile.c | 329 +++++++++++++++++++++++++++ fs/xfs/scrub/xfile.h | 60 +++++ fs/xfs/xfs_buf.c | 5 fs/xfs/xfs_buf.h | 10 + fs/xfs/xfs_export.c | 2 fs/xfs/xfs_hooks.c | 94 ++++++++ fs/xfs/xfs_hooks.h | 72 ++++++ fs/xfs/xfs_icache.c | 3 fs/xfs/xfs_icache.h | 11 + fs/xfs/xfs_inode.c | 229 +++++++++++++++++++ fs/xfs/xfs_inode.h | 37 +++ fs/xfs/xfs_itable.c | 8 + fs/xfs/xfs_linux.h | 1 fs/xfs/xfs_mount.h | 2 fs/xfs/xfs_super.c | 2 fs/xfs/xfs_symlink.c | 1 48 files changed, 4112 insertions(+), 642 deletions(-) create mode 100644 fs/xfs/scrub/iscan.c create mode 100644 fs/xfs/scrub/iscan.h create mode 100644 fs/xfs/scrub/listxattr.c create mode 100644 fs/xfs/scrub/listxattr.h create mode 100644 fs/xfs/scrub/readdir.c create mode 100644 fs/xfs/scrub/readdir.h create mode 100644 fs/xfs/scrub/tempfile.c create mode 100644 fs/xfs/scrub/tempfile.h create mode 100644 fs/xfs/scrub/xfarray.c create mode 100644 fs/xfs/scrub/xfarray.h create mode 100644 fs/xfs/scrub/xfblob.c create mode 100644 fs/xfs/scrub/xfblob.h create mode 100644 fs/xfs/scrub/xfile.c create mode 100644 fs/xfs/scrub/xfile.h create mode 100644 fs/xfs/xfs_hooks.c create mode 100644 fs/xfs/xfs_hooks.h