[Ocfs2-tools-devel] [PATCH] Don't account space used for system files when disabling sparse feature
Jan Kara
jack at suse.cz
Mon Sep 7 14:28:55 PDT 2009
System files (except for root directory) are not accounted in quota. So we
should not add the space used to fill holes in them when disabling sparse
feature.
Signed-off-by: Jan Kara <jack at suse.cz>
---
tunefs.ocfs2/feature_sparse_files.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/tunefs.ocfs2/feature_sparse_files.c b/tunefs.ocfs2/feature_sparse_files.c
index d4dff34..60e54c6 100644
--- a/tunefs.ocfs2/feature_sparse_files.c
+++ b/tunefs.ocfs2/feature_sparse_files.c
@@ -509,7 +509,9 @@ static errcode_t fill_sparse_files(ocfs2_filesys *fs,
if (ret)
break;
}
- if (di->i_clusters != file->old_clusters) {
+ if (di->i_clusters != file->old_clusters &&
+ (!(di->i_flags & OCFS2_SYSTEM_FL) ||
+ file->blkno == super->s_root_blkno)) {
long long change;
ocfs2_cached_dquot *udquot = NULL, *gdquot = NULL;
--
1.6.0.2
More information about the Ocfs2-tools-devel
mailing list