diff mbox series

[v16,11/28] xfsprogs: Check for extent overflow when swapping extents

Message ID 20210326003131.32642-12-allison.henderson@oracle.com (mailing list archive)
State New, archived
Headers show
Series xfsprogs: Delay Ready Attributes | expand

Commit Message

Allison Henderson March 26, 2021, 12:31 a.m. UTC
From: Chandan Babu R <chandanrlinux@gmail.com>

Source kernel commit: bcc561f21f115437a010307420fc43d91be91c66

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>
Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
---
 libxfs/xfs_inode_fork.h | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/libxfs/xfs_inode_fork.h b/libxfs/xfs_inode_fork.h
index c8f279e..9e2137c 100644
--- a/libxfs/xfs_inode_fork.h
+++ b/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.
  */