]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: Check for extent overflow when adding dir entries
authorChandan Babu R <chandanrlinux@gmail.com>
Mon, 5 Apr 2021 21:58:14 +0000 (17:58 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Mon, 5 Apr 2021 21:58:14 +0000 (17:58 -0400)
commita03446b56e7211c33e90d20159478dd65dc0f42f
tree7931d39b319e629397173e7c2f214179b6f6ec22
parent65f4eca092adef55b46037779d02d4e956a9bdb7
xfs: Check for extent overflow when adding dir entries

Source kernel commit: f5d92749191402c50e32ac83dd9da3b910f5680f

Directory entry addition can cause the following,
1. Data block can be added/removed.
A new extent can cause extent count to increase by 1.
2. Free disk block can be added/removed.
Same behaviour as described above for Data block.
3. Dabtree blocks.
XFS_DA_NODE_MAXDEPTH blocks can be added. Each of these
can be new extents. Hence extent count can increase by
XFS_DA_NODE_MAXDEPTH.

Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_inode_fork.h