summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_inode_fork.h
diff options
context:
space:
mode:
authorChandan Babu R <chandanrlinux@gmail.com>2021-01-23 03:48:15 +0300
committerDarrick J. Wong <djwong@kernel.org>2021-01-23 03:54:48 +0300
commitbcc561f21f115437a010307420fc43d91be91c66 (patch)
tree83114d7d111d220764d8ee4afca14c0a75211a71 /fs/xfs/libxfs/xfs_inode_fork.h
parentee898d78c3540b44270a5fdffe208d7bbb219d93 (diff)
downloadlinux-bcc561f21f115437a010307420fc43d91be91c66.tar.xz
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/xfs_inode_fork.h')
-rw-r--r--fs/xfs/libxfs/xfs_inode_fork.h7
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.
*/