diff options
author | Chandan Babu R <chandanrlinux@gmail.com> | 2021-01-22 16:48:15 -0800 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-01-22 16:54:48 -0800 |
commit | bcc561f21f115437a010307420fc43d91be91c66 (patch) | |
tree | 83114d7d111d220764d8ee4afca14c0a75211a71 /fs/xfs/libxfs | |
parent | ee898d78c3540b44270a5fdffe208d7bbb219d93 (diff) | |
download | linux-stable-bcc561f21f115437a010307420fc43d91be91c66.tar.gz linux-stable-bcc561f21f115437a010307420fc43d91be91c66.tar.bz2 linux-stable-bcc561f21f115437a010307420fc43d91be91c66.zip |
xfs: Check for extent overflow when swapping extents
Removing an initial range of source/donor file's extent and adding a new
extent (from donor/source file) in its place will cause extent count to
increase by 1.
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
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')
-rw-r--r-- | fs/xfs/libxfs/xfs_inode_fork.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_inode_fork.h b/fs/xfs/libxfs/xfs_inode_fork.h index c8f279edc5c1..9e2137cd7372 100644 --- a/fs/xfs/libxfs/xfs_inode_fork.h +++ b/fs/xfs/libxfs/xfs_inode_fork.h @@ -89,6 +89,13 @@ struct xfs_ifork { #define XFS_IEXT_REFLINK_END_COW_CNT (2) /* + * Removing an initial range of source/donor file's extent and adding a new + * extent (from donor/source file) in its place will cause extent count to + * increase by 1. + */ +#define XFS_IEXT_SWAP_RMAP_CNT (1) + +/* * Fork handling. */ |