All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/26] Parent Pointers
@ 2022-09-22  5:44 allison.henderson
  2022-09-22  5:44 ` [PATCH v3 01/26] xfs: Add new name to attri/d allison.henderson
                   ` (25 more replies)
  0 siblings, 26 replies; 76+ messages in thread
From: allison.henderson @ 2022-09-22  5:44 UTC (permalink / raw)
  To: linux-xfs

From: Allison Henderson <allison.henderson@oracle.com>

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_pptrsv3_rebase4

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

This set has been tested with the below parent pointers tests
https://www.spinics.net/lists/fstests/msg19963.html


Updates since v2:

xfs: Hold inode locks in xfs_rename
  NEW

xfs: Expose init_xattrs in xfs_create_tmpfile
  NEW
  
xfs: Add parent pointers to xfs_cross_rename
  NEW
  
xfs: Indent xfs_rename
  NEW
  
xfs: Add parent pointers to rename
  Added parent pointers for WIP

xfs: Add xfs_verify_pptr
   Fixed indentaion in xfs_verify_pptr
   Updates for new name field

xfs: extend transaction reservations for parent attributes
   Moved/removed stale comments in xfs_calc_parent_ptr_reservations and  xfs_calc_namespace_reservations
   Reduced resp->tr_rename.tr_logres in xfs_calc_parent_ptr_reservations since logged attrs can separate transaction updates
   Updated inode reservation in xfs_calc_rename_reservation

xfs: parent pointer attribute creation
   Moved target id and name parameters from xfs_parent_init to xfs_parent_defer_add

xfs: add parent attributes to link
   Rebase updates to xfs_parent_init and xfs_parent_defer_add
  
xfs: remove parent pointers in unlink
    Rebase updates xfs_parent_init and xfs_parent_defer_remove.
    Renamed ip to dp in xfs_parent_defer_remove
    Simplified xfs_has_parent check in xfs_remove

xfs: Add parent pointers to rename
  Rebase updates to xfs_parent_init, xfs_parent_defer_remove and
     xfs_parent_defer_replace

xfs: Add parent pointers to symlink
   NEW

xfs: Filter XFS_ATTR_PARENT for get_fattr
   NEW

xfs: Add parent pointer ioctl
   Added new XFS_PPTR_FLAG_ALL
   Removed namelen from xfs_parent_ptr.  Added rsvd
   Renamed XFS_IOC_GETPPOINTER to XFS_IOC_GETPARENT
   Added const qualifier to xfs_init_parent
   Added XFS_IOC_ATTR_PARENT check in xfs_attrmulti_attr_set and
      xfs_ioc_attrmulti_one
   Updated SDX headers

   In xfs_ioc_get_parent_pointer:
     Updated kmem_alloc to kmalloc 
     Updated return codes for copy to/from user to -EFAULT
     Updated XFS_PPTR_OFLAG_* handling
     Removed GFP_NOFS | __GFP_NOFAIL from realloc

   In xfs_attr_get_parent_pointer:
     Fixed indentation
     Updated error returns to -EFSCORRUPTED
     Changed xfs_ilock to xfs_ilock_attr_map_shared
     Added inode checking

xfs: drop compatibility minimum log size computations for reflink
   NEW
xfs: Filter XFS_ATTR_PARENT for get_fattr
   NEW

Investigated removeing memset in xfs_attr_get_parent_pointer
  Trips assertion for non-zeroed context
   XFS: Assertion failed: !context->seen_enough, file: fs/xfs/xfs_ioctl.c, line: 317

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: Add parent pointers to xfs_cross_rename
  xfs: Indent xfs_rename
  xfs: Add parent pointers to 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  |  33 ++-
 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         |  60 ++++++
 fs/xfs/libxfs/xfs_log_format.h |   7 +-
 fs/xfs/libxfs/xfs_log_rlimit.c |  53 +++++
 fs/xfs/libxfs/xfs_parent.c     | 193 +++++++++++++++++
 fs/xfs/libxfs/xfs_parent.h     |  45 ++++
 fs/xfs/libxfs/xfs_sb.c         |   4 +
 fs/xfs/libxfs/xfs_trans_resv.c | 135 +++++++++---
 fs/xfs/scrub/attr.c            |   2 +-
 fs/xfs/xfs_attr_item.c         | 115 ++++++++--
 fs/xfs/xfs_attr_item.h         |   1 +
 fs/xfs/xfs_attr_list.c         |  64 ++++--
 fs/xfs/xfs_file.c              |   1 +
 fs/xfs/xfs_inode.c             | 374 +++++++++++++++++++++++++--------
 fs/xfs/xfs_inode.h             |   3 +-
 fs/xfs/xfs_ioctl.c             | 160 ++++++++++++--
 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_super.c             |   4 +
 fs/xfs/xfs_symlink.c           |  35 ++-
 fs/xfs/xfs_trans.c             |   6 +-
 fs/xfs/xfs_xattr.c             |   2 +-
 fs/xfs/xfs_xattr.h             |   1 +
 40 files changed, 1427 insertions(+), 209 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


^ permalink raw reply	[flat|nested] 76+ messages in thread

end of thread, other threads:[~2022-09-28 18:22 UTC | newest]

Thread overview: 76+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-22  5:44 [PATCH v3 00/26] Parent Pointers allison.henderson
2022-09-22  5:44 ` [PATCH v3 01/26] xfs: Add new name to attri/d allison.henderson
2022-09-23 18:53   ` Darrick J. Wong
2022-09-23 20:43     ` Allison Henderson
2022-09-22  5:44 ` [PATCH v3 02/26] xfs: Increase XFS_DEFER_OPS_NR_INODES to 5 allison.henderson
2022-09-23 19:02   ` Darrick J. Wong
2022-09-23 20:45     ` Allison Henderson
2022-09-22  5:44 ` [PATCH v3 03/26] xfs: Hold inode locks in xfs_ialloc allison.henderson
2022-09-22  5:44 ` [PATCH v3 04/26] xfs: Hold inode locks in xfs_trans_alloc_dir allison.henderson
2022-09-23 19:04   ` Darrick J. Wong
2022-09-23 20:44     ` Allison Henderson
2022-09-22  5:44 ` [PATCH v3 05/26] xfs: Hold inode locks in xfs_rename allison.henderson
2022-09-23 19:21   ` Darrick J. Wong
2022-09-23 20:44     ` Allison Henderson
2022-09-22  5:44 ` [PATCH v3 06/26] xfs: Expose init_xattrs in xfs_create_tmpfile allison.henderson
2022-09-23 19:25   ` Darrick J. Wong
2022-09-23 20:45     ` Allison Henderson
2022-09-23 21:18       ` Darrick J. Wong
2022-09-22  5:44 ` [PATCH v3 07/26] xfs: get directory offset when adding directory name allison.henderson
2022-09-22  5:44 ` [PATCH v3 08/26] xfs: get directory offset when removing " allison.henderson
2022-09-22  5:44 ` [PATCH v3 09/26] xfs: get directory offset when replacing a " allison.henderson
2022-09-22  5:44 ` [PATCH v3 10/26] xfs: add parent pointer support to attribute code allison.henderson
2022-09-22  5:44 ` [PATCH v3 11/26] xfs: define parent pointer xattr format allison.henderson
2022-09-22  5:44 ` [PATCH v3 12/26] xfs: Add xfs_verify_pptr allison.henderson
2022-09-22  5:44 ` [PATCH v3 13/26] xfs: extend transaction reservations for parent attributes allison.henderson
2022-09-23 20:17   ` Darrick J. Wong
2022-09-23 23:53     ` Allison Henderson
2022-09-26 23:53       ` Darrick J. Wong
2022-09-27 20:04         ` Allison Henderson
2022-09-27 20:44           ` Darrick J. Wong
2022-09-22  5:44 ` [PATCH v3 14/26] xfs: parent pointer attribute creation allison.henderson
2022-09-23 21:11   ` Darrick J. Wong
2022-09-26 21:48     ` Allison Henderson
2022-09-26 23:54       ` Darrick J. Wong
2022-09-27 20:10         ` Allison Henderson
2022-09-22  5:44 ` [PATCH v3 15/26] xfs: add parent attributes to link allison.henderson
2022-09-23 20:31   ` Darrick J. Wong
2022-09-26 21:49     ` Allison Henderson
2022-09-26 23:55       ` Darrick J. Wong
2022-09-22  5:44 ` [PATCH v3 16/26] xfs: add parent attributes to symlink allison.henderson
2022-09-23 21:16   ` Darrick J. Wong
2022-09-26 21:48     ` Allison Henderson
2022-09-22  5:44 ` [PATCH v3 17/26] xfs: remove parent pointers in unlink allison.henderson
2022-09-23 21:22   ` Darrick J. Wong
2022-09-26 21:49     ` Allison Henderson
2022-09-22  5:44 ` [PATCH v3 18/26] xfs: Add parent pointers to xfs_cross_rename allison.henderson
2022-09-23 21:52   ` Darrick J. Wong
2022-09-26 21:50     ` Allison Henderson
2022-09-22  5:44 ` [PATCH v3 19/26] xfs: Indent xfs_rename allison.henderson
2022-09-23 21:22   ` Darrick J. Wong
2022-09-26 21:49     ` Allison Henderson
2022-09-22  5:44 ` [PATCH v3 20/26] xfs: Add parent pointers to rename allison.henderson
2022-09-23 22:08   ` Darrick J. Wong
2022-09-26 21:50     ` Allison Henderson
2022-09-22  5:44 ` [PATCH v3 21/26] xfs: Add the parent pointer support to the superblock version 5 allison.henderson
2022-09-22  5:44 ` [PATCH v3 22/26] xfs: Add helper function xfs_attr_list_context_init allison.henderson
2022-09-22  5:44 ` [PATCH v3 23/26] xfs: Filter XFS_ATTR_PARENT for getfattr allison.henderson
2022-09-22 16:55   ` Allison Henderson
2022-09-23 21:45   ` Darrick J. Wong
2022-09-26 21:49     ` Allison Henderson
2022-09-27 18:32       ` Darrick J. Wong
2022-09-28 18:22         ` Allison Henderson
2022-09-28  1:13   ` [xfs] b73248c4ee: xfstests.xfs.269.fail kernel test robot
2022-09-28  1:13     ` kernel test robot
2022-09-22  5:44 ` [PATCH v3 24/26] xfs: Add parent pointer ioctl allison.henderson
2022-09-22 14:02   ` kernel test robot
2022-09-24  0:30   ` Darrick J. Wong
2022-09-26 21:50     ` Allison Henderson
2022-09-27 18:34       ` Darrick J. Wong
2022-09-22  5:44 ` [PATCH v3 25/26] xfs: fix unit conversion error in xfs_log_calc_max_attrsetm_res allison.henderson
2022-09-23 21:47   ` Darrick J. Wong
2022-09-26 21:50     ` Allison Henderson
2022-09-27  0:02       ` Darrick J. Wong
2022-09-22  5:44 ` [PATCH v3 26/26] xfs: drop compatibility minimum log size computations for reflink allison.henderson
2022-09-23 21:48   ` Darrick J. Wong
2022-09-26 21:50     ` Allison Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.