[Ocfs2-tools-devel] [PATCH 11/11] Fix tunefs space check when disabling SPARSE feature

Jan Kara jack at suse.cz
Wed Aug 26 06:17:43 PDT 2009


Tunefs missed addition of number clusters needed to fill holes when disabling
SPARSE feature and hence the check whether there's enough space in the
filesystem didn't work.

Signed-off-by: Jan Kara <jack at suse.cz>
---
 tunefs.ocfs2/feature_sparse_files.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tunefs.ocfs2/feature_sparse_files.c b/tunefs.ocfs2/feature_sparse_files.c
index 91ebca5..d4dff34 100644
--- a/tunefs.ocfs2/feature_sparse_files.c
+++ b/tunefs.ocfs2/feature_sparse_files.c
@@ -327,6 +327,7 @@ static errcode_t hole_iterate(ocfs2_filesys *fs, struct ocfs2_dinode *di,
 
 	list_add_tail(&file->list, &ctxt->files);
 	ctxt->holecount += file->holes_num;
+	ctxt->more_clusters += file->hole_clusters;
 
 	tools_progress_step(ctxt->prog, 1);
 
-- 
1.6.0.2




More information about the Ocfs2-tools-devel mailing list