Hi all, This is the latest parent pointer attributes for xfs. The goal of this patch set is to add a parent pointer attribute to each inode. The attribute name containing the parent inode, generation, and directory offset, while the attribute value contains the file name. This feature will enable future optimizations for online scrub, shrink, nfs handles, verity, or any other feature that could make use of quickly deriving an inodes path from the mount point. This set can be viewed on github here https://github.com/allisonhenderson/xfs/tree/xfs_new_pptrsv9_r2 And the corresponding xfsprogs code is here https://github.com/allisonhenderson/xfsprogs/tree/xfsprogs_new_pptrs_v9_r2 This set has been tested with the below parent pointers tests https://lore.kernel.org/fstests/20221012013812.82161-1-catherine.hoang@xxxxxxxxxx/T/#t Updates since v8: xfs: parent pointer attribute creation Fix xfs_parent_init to release log assist on alloc fail Add slab cache for xfs_parent_defer Fix xfs_create to release after unlock Add xfs_parent_start and xfs_parent_finish wrappers removed unused xfs_parent_name_irec and xfs_init_parent_name_irec xfs: add parent attributes to link Start/finish wrapper updates Fix xfs_link to disallow reservationless quotas xfs: add parent attributes to symlink Fix xfs_symlink to release after unlock Start/finish wrapper updates xfs: remove parent pointers in unlink Start/finish wrapper updates Add missing parent free xfs: Add parent pointers to rename Start/finish wrapper updates Fix rename to only grab logged xattr once Fix xfs_rename to disallow reservationless quotas Fix double unlock on dqattach fail Move parent frees to out_release_wip xfs: Add parent pointers to xfs_cross_rename Hoist parent pointers into rename Questions comments and feedback appreciated! Thanks all! Allison 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 xfsprogs git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=pptrs fstests git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=pptrs --- fs/xfs/Makefile | 2 fs/xfs/libxfs/xfs_attr.c | 71 +++++- fs/xfs/libxfs/xfs_attr.h | 13 + fs/xfs/libxfs/xfs_da_btree.h | 3 fs/xfs/libxfs/xfs_da_format.h | 26 ++ fs/xfs/libxfs/xfs_defer.c | 28 ++ fs/xfs/libxfs/xfs_defer.h | 8 + fs/xfs/libxfs/xfs_dir2.c | 21 +- fs/xfs/libxfs/xfs_dir2.h | 7 - fs/xfs/libxfs/xfs_dir2_block.c | 9 - fs/xfs/libxfs/xfs_dir2_leaf.c | 8 + fs/xfs/libxfs/xfs_dir2_node.c | 8 + fs/xfs/libxfs/xfs_dir2_sf.c | 6 + fs/xfs/libxfs/xfs_format.h | 4 fs/xfs/libxfs/xfs_fs.h | 75 +++++++ fs/xfs/libxfs/xfs_log_format.h | 7 - fs/xfs/libxfs/xfs_log_rlimit.c | 53 +++++ fs/xfs/libxfs/xfs_parent.c | 203 ++++++++++++++++++ fs/xfs/libxfs/xfs_parent.h | 84 +++++++ fs/xfs/libxfs/xfs_sb.c | 4 fs/xfs/libxfs/xfs_trans_resv.c | 324 ++++++++++++++++++++++++---- fs/xfs/libxfs/xfs_trans_space.h | 8 - fs/xfs/scrub/attr.c | 4 fs/xfs/xfs_attr_item.c | 142 ++++++++++-- fs/xfs/xfs_attr_item.h | 1 fs/xfs/xfs_attr_list.c | 17 + fs/xfs/xfs_dquot.c | 38 +++ fs/xfs/xfs_dquot.h | 1 fs/xfs/xfs_file.c | 1 fs/xfs/xfs_inode.c | 447 +++++++++++++++++++++++++++++++-------- fs/xfs/xfs_inode.h | 3 fs/xfs/xfs_ioctl.c | 148 +++++++++++-- fs/xfs/xfs_ioctl.h | 2 fs/xfs/xfs_iops.c | 3 fs/xfs/xfs_ondisk.h | 4 fs/xfs/xfs_parent_utils.c | 126 +++++++++++ fs/xfs/xfs_parent_utils.h | 11 + fs/xfs/xfs_qm.c | 4 fs/xfs/xfs_qm.h | 2 fs/xfs/xfs_super.c | 14 + fs/xfs/xfs_symlink.c | 58 ++++- fs/xfs/xfs_trans.c | 13 + fs/xfs/xfs_trans_dquot.c | 15 + fs/xfs/xfs_xattr.c | 7 - fs/xfs/xfs_xattr.h | 2 45 files changed, 1782 insertions(+), 253 deletions(-) create mode 100644 fs/xfs/libxfs/xfs_parent.c create mode 100644 fs/xfs/libxfs/xfs_parent.h create mode 100644 fs/xfs/xfs_parent_utils.c create mode 100644 fs/xfs/xfs_parent_utils.h