[PATCH v5 00/26] Parent Pointers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Allison Henderson <allison.henderson@xxxxxxxxxx>

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, 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_pptrsv5_r1

And the corresponding xfsprogs code is here
https://github.com/allisonhenderson/xfsprogs/tree/xfsprogs_new_pptrs_v5_r1

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 v4
xfs: Add new name to attri/d
   Removed 0 item count check from xlog_recover_attri_commit_pass2
   Moved error reports into switch and converted to corruption reports

xfs: Add xfs_verify_pptr
   Added const type to rec param
   Added xfs_attr3_leaf_flags needed by libxfs port
   
xfs: extend transaction reservations for parent attributes
   Refactored xfs_calc_*_reservation routines
   Added helpers:
      xfs_calc_pptr_link_overhead
      xfs_calc_pptr_unlink_overhead
      xfs_calc_pptr_replace_overhead
     
xfs: add parent attributes to link
   Removed unneeded defer cancel in xfs_link
   
xfs: add parent attributes to symlink
   Removed unneeded defer cancel in xfs_symlink
   Removed unused macro XFS_SYMLINK_SPACE_RES
   Whitespace adjust
   Comment updates

xfs: remove parent pointers in unlink
   Removed unused macro XFS_REMOVE_SPACE_RES
   
xfs: Add parent pointers to rename
   Re-ordered this patch with cross rename
   Added old_rec feild in xfs_parent_defer
   Collapsed old_parent param in xfs_parent_defer_replace into old_rec feild
   Renamed ip's to dp's
   Re-ordered xfs_parent_defer_replace parameters
   
xfs: Add parent pointers to xfs_cross_rename
   Updated calls to xfs_parent_defer_replace

Questions comments and feedback appreciated!

Thanks all!
Allison 

Allison Henderson (26):
  xfs: Add new name to attri/d
  xfs: Increase XFS_DEFER_OPS_NR_INODES to 5
  xfs: Hold inode locks in xfs_ialloc
  xfs: Hold inode locks in xfs_trans_alloc_dir
  xfs: Hold inode locks in xfs_rename
  xfs: Expose init_xattrs in xfs_create_tmpfile
  xfs: get directory offset when adding directory name
  xfs: get directory offset when removing directory name
  xfs: get directory offset when replacing a directory name
  xfs: add parent pointer support to attribute code
  xfs: define parent pointer xattr format
  xfs: Add xfs_verify_pptr
  xfs: extend transaction reservations for parent attributes
  xfs: parent pointer attribute creation
  xfs: add parent attributes to link
  xfs: add parent attributes to symlink
  xfs: remove parent pointers in unlink
  xfs: Indent xfs_rename
  xfs: Add parent pointers to rename
  xfs: Add parent pointers to xfs_cross_rename
  xfs: Add the parent pointer support to the  superblock version 5.
  xfs: Add helper function xfs_attr_list_context_init
  xfs: Filter XFS_ATTR_PARENT for getfattr
  xfs: Add parent pointer ioctl
  xfs: fix unit conversion error in xfs_log_calc_max_attrsetm_res
  xfs: drop compatibility minimum log size computations for reflink

 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   |  38 ++-
 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      | 207 ++++++++++++++++
 fs/xfs/libxfs/xfs_parent.h      |  46 ++++
 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             |   2 +-
 fs/xfs/xfs_attr_item.c          | 142 +++++++++--
 fs/xfs/xfs_attr_item.h          |   1 +
 fs/xfs/xfs_attr_list.c          |  17 +-
 fs/xfs/xfs_file.c               |   1 +
 fs/xfs/xfs_inode.c              | 424 +++++++++++++++++++++++++-------
 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       | 124 ++++++++++
 fs/xfs/xfs_parent_utils.h       |  11 +
 fs/xfs/xfs_qm.c                 |   4 +-
 fs/xfs/xfs_super.c              |   4 +
 fs/xfs/xfs_symlink.c            |  54 +++-
 fs/xfs/xfs_trans.c              |   6 +-
 fs/xfs/xfs_xattr.c              |   5 +-
 fs/xfs/xfs_xattr.h              |   1 +
 41 files changed, 1670 insertions(+), 236 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

-- 
2.25.1




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux