[Ocfs2-tools-devel] [PATCH 6/6] Fix EXTENT_OVERLAP errors

Goldwyn Rodrigues rgoldwyn at gmail.com
Tue Aug 16 15:17:27 PDT 2011


Signed-off-by: Goldwyn Rodrigues <rgoldwyn at suse.de>
---
 fsck.ocfs2/extent.c               |    9 +++++++++
 fsck.ocfs2/fsck.ocfs2.checks.8.in |    6 ++++++
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/fsck.ocfs2/extent.c b/fsck.ocfs2/extent.c
index b58311d..3a6f44c 100644
--- a/fsck.ocfs2/extent.c
+++ b/fsck.ocfs2/extent.c
@@ -162,6 +162,15 @@ static errcode_t check_er(o2fsck_state *ost,
struct extent_info *ei,
 		*changed = 1;
 	}

+	if ((er->e_cpos < offset) &&
+		prompt(ost, PY, PR_EXTENT_OVERLAP,
+			"Extent record of owner %"PRIu64" is incorrectly "
+			"set to %d instead of %d. Fix?", owner, er->e_cpos,
+			offset)) {
+		er->e_cpos = offset;
+		*changed = 1;
+	}
+
 	if (el->l_tree_depth) {
 		int is_valid = 0;
 		/* we only expect a given depth when we descend to extent blocks
diff --git a/fsck.ocfs2/fsck.ocfs2.checks.8.in
b/fsck.ocfs2/fsck.ocfs2.checks.8.in
index d887a16..f106657 100644
--- a/fsck.ocfs2/fsck.ocfs2.checks.8.in
+++ b/fsck.ocfs2/fsck.ocfs2.checks.8.in
@@ -1143,6 +1143,12 @@ structures are directories, refcount trees, dx_trees etc.

 Answering yes will remove the hole.

+.SS "EXTENT_OVERLAP"
+The extents of the file overlap, which means there could be two or more
+possible data for a particular offset for the file.
+
+Answering yes will serialize the extents.
+
 .SH "SEE ALSO"
 .BR fsck.ocfs2(8)

-- 
1.7.6



More information about the Ocfs2-tools-devel mailing list