linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] e2fsck: fix error in computing blocks of the ending group
@ 2011-07-19 15:46 Yongqiang Yang
  2011-07-19 16:18 ` Eric Sandeen
  2011-07-22  4:18 ` [PATCH V2] " Eric Sandeen
  0 siblings, 2 replies; 13+ messages in thread
From: Yongqiang Yang @ 2011-07-19 15:46 UTC (permalink / raw)
  To: linux-ext4; +Cc: tytso, Yongqiang Yang

If the blocks of a filesystem is a multiple of blocks_per_group,
blocks of the ending group is computed wrongly.  This patch computes
it by substracting blocks processed from blocks of the filesystem.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
 e2fsck/pass5.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/e2fsck/pass5.c b/e2fsck/pass5.c
index f9d746c..7c4e336 100644
--- a/e2fsck/pass5.c
+++ b/e2fsck/pass5.c
@@ -227,7 +227,7 @@ redo_counts:
 				if (group == (int)fs->group_desc_count - 1)
 					cmp_block =
 						EXT2FS_NUM_B2C(fs,
-		ext2fs_blocks_count(fs->super) % fs->super->s_blocks_per_group);
+					ext2fs_blocks_count(fs->super) - i);
 			}
 
 			bitmap = 0;
-- 
1.7.5.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-09-16 13:29 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-19 15:46 [PATCH] e2fsck: fix error in computing blocks of the ending group Yongqiang Yang
2011-07-19 16:18 ` Eric Sandeen
2011-07-20 21:46   ` [PATCH] e2fsprogs: add ext2fs_group_blocks_count helper Eric Sandeen
2011-07-20 21:57     ` [PATCH V2] " Eric Sandeen
2011-07-21 13:55       ` Eric Sandeen
2011-07-21 14:57         ` Yongqiang Yang
2011-07-21 15:06           ` Eric Sandeen
2011-07-21 18:15       ` [PATCH V3] " Eric Sandeen
2011-09-16 13:22         ` [V3] " Ted Ts'o
2011-07-21 14:54     ` [PATCH] " Yongqiang Yang
2011-07-21 17:40   ` [PATCH] e2fsck: fix error in computing blocks of the ending group Eric Sandeen
2011-07-22  4:18 ` [PATCH V2] " Eric Sandeen
2011-09-16 13:29   ` [V2] " Ted Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).