linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Ext4 Developers List <linux-ext4@vger.kernel.org>
Cc: Theodore Ts'o <tytso@mit.edu>
Subject: [PATCH 06/10] e2fsck: fix pass5 bug when using two different bitmap backends
Date: Sun, 18 Dec 2011 01:42:34 -0500	[thread overview]
Message-ID: <1324190558-7436-7-git-send-email-tytso@mit.edu> (raw)
In-Reply-To: <1324190558-7436-1-git-send-email-tytso@mit.edu>

The pass5 checks would fail if the expected and current {inode,block}
bitmaps used different back ends that returned different non-zero
values from the test_*_bitmap() functions.  Fix this by changing
"(actual == bitmap)" to "(!actual == !bitmap)".

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
 e2fsck/pass5.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/e2fsck/pass5.c b/e2fsck/pass5.c
index a60e84a..1e836e3 100644
--- a/e2fsck/pass5.c
+++ b/e2fsck/pass5.c
@@ -279,7 +279,7 @@ redo_counts:
 		else
 			bitmap = ext2fs_fast_test_block_bitmap2(fs->block_map, i);
 
-		if (actual == bitmap)
+		if (!actual == !bitmap)
 			goto do_counts;
 
 		if (!actual && bitmap) {
@@ -511,7 +511,7 @@ redo_counts:
 			bitmap = actual;
 		else if (!skip_group)
 			bitmap = ext2fs_fast_test_inode_bitmap2(fs->inode_map, i);
-		if (actual == bitmap)
+		if (!actual == !bitmap)
 			goto do_counts;
 
 		if (!actual && bitmap) {
-- 
1.7.8.11.gefc1f.dirty


  parent reply	other threads:[~2011-12-18  6:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-18  6:42 [PATCH 00/10] extent-based bitmaps for e2fsprogs Theodore Ts'o
2011-12-18  6:42 ` [PATCH 01/10] libext2fs: add default_bitmap_type to the ext2_filsys structure Theodore Ts'o
2011-12-18  6:42 ` [PATCH 02/10] libext2fs: add tests for the bitmap functions Theodore Ts'o
2011-12-19 10:59   ` Lukas Czerner
2011-12-18  6:42 ` [PATCH 03/10] libext2fs: add rbtree library Theodore Ts'o
2011-12-18  6:42 ` [PATCH 04/10] libext2fs: add a bitmap implementation using rbtree's Theodore Ts'o
2011-12-18  6:42 ` [PATCH 05/10] libext2fs: add pseudo bitmap backend type EXT2FS_BMAP64_AUTODIR Theodore Ts'o
2011-12-19 11:16   ` Lukas Czerner
2011-12-18  6:42 ` Theodore Ts'o [this message]
2011-12-18  6:42 ` [PATCH 07/10] libext2fs: use the rbtree bitmap by default when initializing a file system Theodore Ts'o
2011-12-19 14:15   ` Lukas Czerner
2011-12-19 14:17     ` Lukas Czerner
2011-12-18  6:42 ` [PATCH 08/10] e2fsck: use different bitmap types as appropriate Theodore Ts'o
2011-12-18  6:42 ` [PATCH 09/10] libext2fs: adjust the description when copying a bitmap Theodore Ts'o
2011-12-18  6:42 ` [PATCH 10/10] libext2fs: add bitmap statistics Theodore Ts'o
2011-12-19 11:43   ` Lukas Czerner
2011-12-19  8:50 ` [PATCH 00/10] extent-based bitmaps for e2fsprogs Lukas Czerner

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=1324190558-7436-7-git-send-email-tytso@mit.edu \
    --to=tytso@mit.edu \
    --cc=linux-ext4@vger.kernel.org \
    /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 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).