]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: Check for extent overflow when adding/removing xattrs
authorChandan Babu R <chandanrlinux@gmail.com>
Sat, 23 Jan 2021 00:48:13 +0000 (16:48 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Sat, 23 Jan 2021 00:54:48 +0000 (16:54 -0800)
commit8d95f63339be71a71959e69f2eb0ee65fe7e6d23
tree9f39a5a28d86e10b55e39d7309f0b74ed8ccdcf9
parentc8560ce1086bd6706e2b5d65cb9fab0e8dcdc96b
xfs: Check for extent overflow when adding/removing xattrs

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>
fs/xfs/libxfs/xfs_attr.c
fs/xfs/libxfs/xfs_inode_fork.h