All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robin Dong <hao.bigrat@gmail.com>
To: linux-ext4@vger.kernel.org
Cc: Robin Dong <sanbai@taobao.com>, Ted Ts'o <tytso@mit.edu>
Subject: [PATCH 1/2 bigalloc] e2fsprogs: remove wrong EXT2FS_C2B in check_block_end
Date: Thu,  4 Aug 2011 11:48:02 +0800	[thread overview]
Message-ID: <1312429682-16970-2-git-send-email-hao.bigrat@gmail.com> (raw)
In-Reply-To: <1312429682-16970-1-git-send-email-hao.bigrat@gmail.com>

From: Robin Dong <sanbai@taobao.com>

The argument "save_blocks_count" and the block bitmap has the unit of cluster,
so it don't need EXT2FS_C2B to convert argument "i".

This patch is based on "next" branch of e2fsprogs.

Signed-off-by: Robin Dong <sanbai@taobao.com>
Cc: Ted Ts'o <tytso@mit.edu>
---
 e2fsck/pass5.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/e2fsck/pass5.c b/e2fsck/pass5.c
index f9d746c..bb2a4dd 100644
--- a/e2fsck/pass5.c
+++ b/e2fsck/pass5.c
@@ -763,12 +763,10 @@ static void check_block_end(e2fsck_t ctx)
 
 	/* Protect loop from wrap-around if end is maxed */
 	for (i = save_blocks_count + 1; i <= end && i > save_blocks_count; i++) {
-		if (!ext2fs_test_block_bitmap2(fs->block_map,
-					       EXT2FS_C2B(fs, i))) {
+		if (!ext2fs_test_block_bitmap2(fs->block_map, i)) {
 			if (fix_problem(ctx, PR_5_BLOCK_BMAP_PADDING, &pctx)) {
 				for (; i <= end; i++)
-					ext2fs_mark_block_bitmap2(fs->block_map,
-							EXT2FS_C2B(fs, i));
+					ext2fs_mark_block_bitmap2(fs->block_map, i);
 				ext2fs_mark_bb_dirty(fs);
 			} else
 				ext2fs_unmark_valid(fs);
-- 
1.7.3.2


  reply	other threads:[~2011-08-04  3:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-04  3:48 [PATCH 2/2 bigalloc] ext4: modify offset to cluster in ext4_valid_block_bitmap Robin Dong
2011-08-04  3:48 ` Robin Dong [this message]
2011-08-11  2:49   ` [PATCH 1/2 bigalloc] e2fsprogs: remove wrong EXT2FS_C2B in check_block_end Ted Ts'o
2011-08-12  3:44     ` Robin Dong
2011-08-11  2:51 ` [PATCH 2/2 bigalloc] ext4: modify offset to cluster in ext4_valid_block_bitmap Ted Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1312429682-16970-2-git-send-email-hao.bigrat@gmail.com \
    --to=hao.bigrat@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sanbai@taobao.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.