[Ocfs2-tools-devel] [PATCH] fsck.ocfs2: Fix i_clusters check.
Tao Ma
tao.ma at oracle.com
Wed Nov 12 22:14:32 PST 2008
i_clusters in ocfs2_dinode is used to indicate how much
clusters have been allocated to the file. So actually
it should be equal to the number we get from extent
list iteration.
Signed-off-by: Tao Ma <tao.ma at oracle.com>
---
fsck.ocfs2/pass1.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fsck.ocfs2/pass1.c b/fsck.ocfs2/pass1.c
index dddc1f9..209f8ff 100644
--- a/fsck.ocfs2/pass1.c
+++ b/fsck.ocfs2/pass1.c
@@ -923,7 +923,7 @@ size_cluster_check:
if (vb.vb_num_blocks > 0)
expected = ocfs2_clusters_in_blocks(fs, vb.vb_num_blocks);
- if (di->i_clusters < expected &&
+ if (di->i_clusters != expected &&
prompt(ost, PY, PR_INODE_CLUSTERS,
"Inode %"PRIu64" has %"PRIu32" clusters but its "
"blocks fit in %"PRIu64" clusters. "
@@ -951,7 +951,7 @@ size_cluster_check:
expected = ocfs2_clusters_in_blocks(fs,
vb.vb_last_block + 1);
- if (di->i_clusters < expected &&
+ if (di->i_clusters != expected &&
prompt(ost, PY, PR_INODE_CLUSTERS,
"Inode %"PRIu64" has %"PRIu32" clusters but its "
"blocks fit in %"PRIu64" clusters. Correct the "
--
1.5.5
More information about the Ocfs2-tools-devel
mailing list