diff options
author | Chandan Babu R <chandanrlinux@gmail.com> | 2021-01-23 03:48:11 +0300 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-01-23 03:54:47 +0300 |
commit | 727e1acd297cae15449607d6e2ee39c71216cf1a (patch) | |
tree | 3057407785005630e7d01a6a6ed491a5c31fdde8 /fs/xfs/libxfs/xfs_inode_fork.h | |
parent | b9b7e1dc56c5ca8d6fc37c410b054e9f26737d2e (diff) | |
download | linux-727e1acd297cae15449607d6e2ee39c71216cf1a.tar.xz |
xfs: Check for extent overflow when trivally adding a new extent
When adding a new data extent (without modifying an inode's existing
extents) the extent count increases only by 1. This commit checks for
extent count overflow in such cases.
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>
Diffstat (limited to 'fs/xfs/libxfs/xfs_inode_fork.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_inode_fork.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_inode_fork.h b/fs/xfs/libxfs/xfs_inode_fork.h index 0beb8e2a00be..7fc2b129a2e7 100644 --- a/fs/xfs/libxfs/xfs_inode_fork.h +++ b/fs/xfs/libxfs/xfs_inode_fork.h @@ -35,6 +35,12 @@ struct xfs_ifork { #define XFS_IFBROOT 0x04 /* i_broot points to the bmap b-tree root */ /* + * Worst-case increase in the fork extent count when we're adding a single + * extent to a fork and there's no possibility of splitting an existing mapping. + */ +#define XFS_IEXT_ADD_NOSPLIT_CNT (1) + +/* * Fork handling. */ |