[Ocfs2-tools-devel] [PATCH] fsck.ocfs2: Set "changed" flag when we clear UNWRITTEN flag.

Tao Ma tao.ma at oracle.com
Thu Nov 12 02:10:37 PST 2009


When we clare UNWRITTEN flag for a extent record, we need to
set "changed" so that the caller can write the block the extent
rec resides in.

Signed-off-by: Tao Ma <tao.ma at oracle.com>
---
 fsck.ocfs2/extent.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fsck.ocfs2/extent.c b/fsck.ocfs2/extent.c
index 17f5981..9c1758a 100644
--- a/fsck.ocfs2/extent.c
+++ b/fsck.ocfs2/extent.c
@@ -185,6 +185,7 @@ static errcode_t check_er(o2fsck_state *ost, struct extent_info *ei,
 		   "Clear the UNWRITTEN flag?", er->e_cpos,
 		   (uint64_t)di->i_blkno)) {
 		er->e_flags &= ~OCFS2_EXT_UNWRITTEN;
+		*changed = 1;
 	}
 
 	first_block = ocfs2_blocks_to_clusters(ost->ost_fs, er->e_blkno);
-- 
1.5.5




More information about the Ocfs2-tools-devel mailing list