]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: Check for extent overflow when adding/removing xattrs
authorChandan Babu R <chandanrlinux@gmail.com>
Mon, 5 Apr 2021 21:58:15 +0000 (17:58 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Mon, 5 Apr 2021 21:58:15 +0000 (17:58 -0400)
commit430cf788ca5bb7c69117d31833ec6e25178d866a
tree31623ec6da5e160eab68b86b5e843ad853533820
parent45140de864cc2aa83c6be6986a7cfddd0677162b
xfs: Check for extent overflow when adding/removing xattrs

Source kernel commit: 3a19bb147c72d2e9b77137bf5130b9cfb50a5eef

Adding/removing an xattr can cause XFS_DA_NODE_MAXDEPTH extents to be
added. One extra extent for dabtree in case a local attr is large enough
to cause a double split.  It can also cause extent count to increase
proportional to the size of a remote xattr's value.

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_attr.c
libxfs/xfs_inode_fork.h