No description
  • C 96.8%
  • Assembly 0.9%
  • Rust 0.7%
  • Shell 0.6%
  • Python 0.5%
  • Other 0.3%
Find a file
Chandan Babu R 47d83c1946 xfs: Parent Pointers [v13.4 3/9]
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.
 
 Directory parent pointers are stored as namespaced extended attributes
 of a file.  Because parent pointers are an indivisible tuple of
 (dirent_name, parent_ino, parent_gen) we cannot use the usual attr name
 lookup functions to find a parent pointer.  This is solvable by
 introducing a new lookup mode that checks both the name and the value of
 the xattr.
 
 Therefore, introduce this new name-value lookup mode that's gated on the
 XFS_ATTR_PARENT namespace.  This requires the introduction of new
 opcodes for the extended attribute update log intent items, which
 actually means that parent pointers (itself an INCOMPAT feature) does
 not depend on the LOGGED_XATTRS log incompat feature bit.
 
 To reduce collisions on the dirent names of parent pointers, introduce a
 new attr hash mode that is the dir2 namehash of the dirent name xor'd
 with the parent inode number.
 
 At this point, Allison has moved on to other things, so I've merged her
 patchset into djwong-dev for merging.
 
 Updates since v12 [djwong]:
 
 Rebase on 6.9-rc and update the online fsck design document.
 Redesign the ondisk format to use the name-value lookups to get us back
 to the point where the attr is (dirent_name -> parent_ino/gen).
 
 Updates since v11 [djwong]:
 
 Rebase on 6.4-rc and make some tweaks and bugfixes to enable the repair
 prototypes.  Merge with djwong-dev and make online repair actually work.
 
 Updates since v10 [djwong]:
 
 Merge in the ondisk format changes to get rid of the diroffset conflicts
 with the parent pointer repair code, rebase the entire series with the
 attr vlookup changes first, and merge all the other random fixes.
 
 Updates since v9:
 
 Reordered patches 2 and 3 to be 6 and 7
 
 xfs: Add xfs_verify_pptr
    moved parent pointer validators to xfs_parent
 
 xfs: Add parent pointer ioctl
    Extra validation checks for fs id
    added missing release for the inode
    use GFP_KERNEL flags for malloc/realloc
    reworked ioctl to use pptr listenty and flex array
 
 NEW
    xfs: don't remove the attr fork when parent pointers are enabled
 
 NEW
    directory lookups should return diroffsets too
 
 NEW
    xfs: move/add parent pointer validators to xfs_parent
 
 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
 
 This has been running on the djcloud for months with no problems.  Enjoy!
 
 Signed-off-by: Darrick J. Wong <djwong@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQ2qTKExjcn+O1o2YRKO3ySh0YRpgUCZih1NgAKCRBKO3ySh0YR
 pj2UAQDJwGaKslDfXmMY0JMS/GTrEwD7IFNQ/cE2fIkfoUNDeAEAs1tPS0lST4MM
 YUC+1DVSkIl+07sV9Xf0q4zMvgJtOQc=
 =oOSQ
 -----END PGP SIGNATURE-----

Merge tag 'pptrs-6.10_2024-04-23' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.10-mergeC

xfs: Parent Pointers

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.

Directory parent pointers are stored as namespaced extended attributes
of a file.  Because parent pointers are an indivisible tuple of
(dirent_name, parent_ino, parent_gen) we cannot use the usual attr name
lookup functions to find a parent pointer.  This is solvable by
introducing a new lookup mode that checks both the name and the value of
the xattr.

Therefore, introduce this new name-value lookup mode that's gated on the
XFS_ATTR_PARENT namespace.  This requires the introduction of new
opcodes for the extended attribute update log intent items, which
actually means that parent pointers (itself an INCOMPAT feature) does
not depend on the LOGGED_XATTRS log incompat feature bit.

To reduce collisions on the dirent names of parent pointers, introduce a
new attr hash mode that is the dir2 namehash of the dirent name xor'd
with the parent inode number.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>

* tag 'pptrs-6.10_2024-04-23' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux:
  xfs: enable parent pointers
  xfs: drop compatibility minimum log size computations for reflink
  xfs: fix unit conversion error in xfs_log_calc_max_attrsetm_res
  xfs: add a incompat feature bit for parent pointers
  xfs: don't remove the attr fork when parent pointers are enabled
  xfs: add parent pointer ioctls
  xfs: split out handle management helpers a bit
  xfs: move handle ioctl code to xfs_handle.c
  xfs: pass the attr value to put_listent when possible
  xfs: don't return XFS_ATTR_PARENT attributes via listxattr
  xfs: Add parent pointers to xfs_cross_rename
  xfs: Add parent pointers to rename
  xfs: remove parent pointers in unlink
  xfs: add parent attributes to symlink
  xfs: add parent attributes to link
  xfs: parent pointer attribute creation
  xfs: create a hashname function for parent pointers
  xfs: extend transaction reservations for parent attributes
  xfs: add parent pointer validator functions
  xfs: Expose init_xattrs in xfs_create_tmpfile
  xfs: record inode generation in xattr update log intent items
  xfs: create attr log item opcodes and formats for parent pointers
  xfs: refactor xfs_is_using_logged_xattrs checks in attr item recovery
  xfs: allow xattr matching on name and value for parent pointers
  xfs: define parent pointer ondisk extended attribute format
  xfs: add parent pointer support to attribute code
  xfs: create a separate hashname function for extended attributes
  xfs: move xfs_attr_defer_add to xfs_attr_item.c
  xfs: check the flags earlier in xfs_attr_match
  xfs: rearrange xfs_attr_match parameters
History 2024-04-24 11:54:37 +05:30
arch Misc x86 fixes: 2024-04-14 10:48:51 -07:00
block block-6.9-20240412 2024-04-12 10:22:33 -07:00
certs This update includes the following changes: 2023-11-02 16:15:30 -10:00
crypto This push fixes a regression that broke iwd as well as a divide by 2024-03-25 10:48:23 -07:00
Documentation docs: describe xfs directory tree online fsck 2024-04-15 14:59:01 -07:00
drivers Fix a bug in the GIC irqchip driver. 2024-04-14 10:12:34 -07:00
fs xfs: enable parent pointers 2024-04-23 07:47:01 -07:00
include vfs: export remap and write check helpers 2024-04-15 14:54:13 -07:00
init fs/proc: Skip bootloader comment if no embedded kernel parameters 2024-04-09 23:36:18 +09:00
io_uring io_uring/net: restore msg_control on sendzc retry 2024-04-08 21:48:41 -06:00
ipc sysctl changes for v6.9-rc1 2024-03-18 14:59:13 -07:00
kernel Misc x86 fixes: 2024-04-14 10:48:51 -07:00
lib Including fixes from bluetooth. 2024-04-11 11:46:31 -07:00
LICENSES LICENSES: Add the copyleft-next-0.3.1 license 2022-11-08 15:44:01 +01:00
mm x86/mm/pat: fix VM_PAT handling in COW mappings 2024-04-05 11:21:31 -07:00
net Including fixes from bluetooth. 2024-04-11 11:46:31 -07:00
rust Kbuild updates for v6.9 2024-03-21 14:41:00 -07:00
samples Tracing updates for 6.9: 2024-03-18 15:11:44 -07:00
scripts hardening fixes for v6.9-rc4 2024-04-10 13:31:34 -07:00
security security: Place security_path_post_mknod() where the original IMA call was 2024-04-03 10:21:32 -07:00
sound ASoC: Fixes for v6.9 2024-04-05 08:48:12 +02:00
tools Misc timer fixes: 2024-04-14 10:32:22 -07:00
usr Kbuild updates for v6.8 2024-01-18 17:57:07 -08:00
virt KVM Xen and pfncache changes for 6.9: 2024-03-11 10:42:55 -04:00
.clang-format clang-format: Update with v6.7-rc4's for_each macro list 2023-12-08 23:54:38 +01:00
.cocciconfig scripts: add Linux .cocciconfig for coccinelle 2016-07-22 12:13:39 +02:00
.editorconfig Add .editorconfig file for basic formatting 2023-12-28 16:22:47 +09:00
.get_maintainer.ignore Add Jeff Kirsher to .get_maintainer.ignore 2024-03-08 11:36:54 +00:00
.gitattributes .gitattributes: set diff driver for Rust source code files 2023-05-31 17:48:25 +02:00
.gitignore kbuild: create a list of all built DTB files 2024-02-19 18:20:39 +09:00
.mailmap MAINTAINERS: change vmware.com addresses to broadcom.com 2024-04-05 11:21:31 -07:00
.rustfmt.toml rust: add .rustfmt.toml 2022-09-28 09:02:20 +02:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: Drop Gustavo Pimentel as PCI DWC Maintainer 2024-03-27 13:41:02 -05:00
Kbuild Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS SoC fixes for 6.9 2024-04-12 13:02:27 -07:00
Makefile Linux 6.9-rc4 2024-04-14 13:38:39 -07:00
README README: Fix spelling 2024-03-18 03:36:32 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the reStructuredText markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.