Thread (38 messages) 38 messages, 1 author, 2021-02-18
STALE1954d REVIEWED: 6 (4M)
Revisions (4)
  1. v12 [diff vs current]
  2. v13 [diff vs current]
  3. v14 [diff vs current]
  4. v15 current

[PATCH v15 04/37] xfsprogs: Check for extent overflow when punching a hole

From: Allison Henderson <hidden>
Date: 2021-02-18 18:45:10
Subsystem: the rest · Maintainer: Linus Torvalds

From: Chandan Babu R <redacted>

Source kernel commit: 85ef08b5a667615bc7be5058259753dc42a7adcd

The extent mapping the file offset at which a hole has to be
inserted will be split into two extents causing extent count to
increase by 1.

Reviewed-by: Darrick J. Wong <redacted>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Allison Henderson <redacted>
Signed-off-by: Chandan Babu R <redacted>
Signed-off-by: Darrick J. Wong <redacted>
Signed-off-by: Allison Henderson <redacted>
---
 libxfs/xfs_inode_fork.h | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/libxfs/xfs_inode_fork.h b/libxfs/xfs_inode_fork.h
index 7fc2b12..bcac769 100644
--- a/libxfs/xfs_inode_fork.h
+++ b/libxfs/xfs_inode_fork.h
@@ -41,6 +41,13 @@ struct xfs_ifork {
 #define XFS_IEXT_ADD_NOSPLIT_CNT	(1)
 
 /*
+ * Punching out an extent from the middle of an existing extent can cause the
+ * extent count to increase by 1.
+ * i.e. | Old extent | Hole | Old extent |
+ */
+#define XFS_IEXT_PUNCH_HOLE_CNT		(1)
+
+/*
  * Fork handling.
  */
 
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help