]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: add a method to replace shortform attrs
authorDarrick J. Wong <djwong@kernel.org>
Sun, 22 Feb 2026 22:41:09 +0000 (14:41 -0800)
committerAndrey Albershteyn <aalbersh@kernel.org>
Wed, 8 Apr 2026 19:39:56 +0000 (21:39 +0200)
commitf61109373545845caf2c2dc041dc2cfcea1db3f2
treeded5bdc2eb632902fa457656ef5ce7bfa2de218f
parent7ba08aabba0ca0957c2a76bee0dc86ebbb3e7aee
xfs: add a method to replace shortform attrs

Source kernel commit: eaec8aeff31d0679eadb27a13a62942ddbfd7b87

If we're trying to replace an xattr in a shortform attr structure and
the old entry fits the new entry, we can just memcpy and exit without
having to delete, compact, and re-add the entry (or worse use the attr
intent machinery).  For parent pointers this only advantages renaming
where the filename length stays the same (e.g. mv autoexec.bat
scandisk.exe) but for regular xattrs it might be useful for updating
security labels and the like.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
include/xfs_trace.h
libxfs/xfs_attr.c
libxfs/xfs_attr_leaf.c
libxfs/xfs_attr_leaf.h