summaryrefslogtreecommitdiffstats
path: root/e2fsck/extents.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--e2fsck/extents.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/e2fsck/extents.c b/e2fsck/extents.c
index 70798f3..652e938 100644
--- a/e2fsck/extents.c
+++ b/e2fsck/extents.c
@@ -201,7 +201,10 @@ static errcode_t rewrite_extent_replay(e2fsck_t ctx, struct extent_list *list,
{
errcode_t retval;
ext2_extent_handle_t handle;
- unsigned int i, ext_written;
+ unsigned int i;
+#if defined(DEBUG) || defined(DEBUG_SUMMARY)
+ unsigned int ext_written = 0;
+#endif
struct ext2fs_extent *ex, extent;
blk64_t start_val, delta;
@@ -223,8 +226,6 @@ static errcode_t rewrite_extent_replay(e2fsck_t ctx, struct extent_list *list,
if (retval)
return retval;
- ext_written = 0;
-
start_val = ext2fs_get_stat_i_blocks(ctx->fs, EXT2_INODE(inode));
for (i = 0, ex = list->extents; i < list->count; i++, ex++) {
@@ -263,7 +264,9 @@ static errcode_t rewrite_extent_replay(e2fsck_t ctx, struct extent_list *list,
retval = ext2fs_extent_fix_parents(handle);
if (retval)
goto err;
+#if defined(DEBUG) || defined(DEBUG_SUMMARY)
ext_written++;
+#endif
}
delta = ext2fs_get_stat_i_blocks(ctx->fs, EXT2_INODE(inode)) -