lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 27 Aug 2008 17:14:33 -0400
From:	Theodore Ts'o <tytso@....edu>
To:	Frédéric Bohé <frederic.bohe@...l.net>
Cc:	linux-ext4@...r.kernel.org, Theodore Ts'o <tytso@....edu>
Subject: [PATCH 1/4] ext2fs_mkjournal(): Don't allocate an extra block to the journal

Addresses-Sourceforge-Bug: 1483791

Signed-off-by: "Theodore Ts'o" <tytso@....edu>
---
 lib/ext2fs/mkjournal.c           |    2 +-
 tests/f_badjour_indblks/expect.1 |    2 +-
 tests/f_badjour_indblks/expect.2 |    2 +-
 tests/f_badjourblks/expect.1     |    2 +-
 tests/f_badjourblks/expect.2     |    2 +-
 tests/f_miss_journal/expect.1    |    2 +-
 tests/f_miss_journal/expect.2    |    2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/ext2fs/mkjournal.c b/lib/ext2fs/mkjournal.c
index e55dcbd..3cae874 100644
--- a/lib/ext2fs/mkjournal.c
+++ b/lib/ext2fs/mkjournal.c
@@ -225,7 +225,7 @@ static int mkjournal_proc(ext2_filsys	fs,
 		es->err = retval;
 		return BLOCK_ABORT;
 	}
-	if (blockcnt > 0)
+	if (blockcnt >= 0)
 		es->num_blocks--;
 
 	es->newblocks++;
diff --git a/tests/f_badjour_indblks/expect.1 b/tests/f_badjour_indblks/expect.1
index 0190bf2..d80da89 100644
--- a/tests/f_badjour_indblks/expect.1
+++ b/tests/f_badjour_indblks/expect.1
@@ -29,5 +29,5 @@ Creating journal (1024 blocks):  Done.
 *** journal has been re-created - filesystem is now ext3 again ***
 
 test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
-test_filesys: 11/256 files (0.0% non-contiguous), 1112/8192 blocks
+test_filesys: 11/256 files (0.0% non-contiguous), 1111/8192 blocks
 Exit status is 1
diff --git a/tests/f_badjour_indblks/expect.2 b/tests/f_badjour_indblks/expect.2
index 35365fa..3fbb8b3 100644
--- a/tests/f_badjour_indblks/expect.2
+++ b/tests/f_badjour_indblks/expect.2
@@ -3,5 +3,5 @@ Pass 2: Checking directory structure
 Pass 3: Checking directory connectivity
 Pass 4: Checking reference counts
 Pass 5: Checking group summary information
-test_filesys: 11/256 files (0.0% non-contiguous), 1112/8192 blocks
+test_filesys: 11/256 files (0.0% non-contiguous), 1111/8192 blocks
 Exit status is 0
diff --git a/tests/f_badjourblks/expect.1 b/tests/f_badjourblks/expect.1
index 5a0bfef..cd86fc4 100644
--- a/tests/f_badjourblks/expect.1
+++ b/tests/f_badjourblks/expect.1
@@ -27,5 +27,5 @@ Creating journal (1024 blocks):  Done.
 *** journal has been re-created - filesystem is now ext3 again ***
 
 test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
-test_filesys: 11/256 files (0.0% non-contiguous), 1080/8192 blocks
+test_filesys: 11/256 files (0.0% non-contiguous), 1079/8192 blocks
 Exit status is 1
diff --git a/tests/f_badjourblks/expect.2 b/tests/f_badjourblks/expect.2
index 632dc71..7c50703 100644
--- a/tests/f_badjourblks/expect.2
+++ b/tests/f_badjourblks/expect.2
@@ -3,5 +3,5 @@ Pass 2: Checking directory structure
 Pass 3: Checking directory connectivity
 Pass 4: Checking reference counts
 Pass 5: Checking group summary information
-test_filesys: 11/256 files (0.0% non-contiguous), 1080/8192 blocks
+test_filesys: 11/256 files (0.0% non-contiguous), 1079/8192 blocks
 Exit status is 0
diff --git a/tests/f_miss_journal/expect.1 b/tests/f_miss_journal/expect.1
index cad69f6..7d696f8 100644
--- a/tests/f_miss_journal/expect.1
+++ b/tests/f_miss_journal/expect.1
@@ -25,5 +25,5 @@ Creating journal (1024 blocks):  Done.
 *** journal has been re-created - filesystem is now ext3 again ***
 
 test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
-test_filesys: 11/256 files (0.0% non-contiguous), 1080/2048 blocks
+test_filesys: 11/256 files (0.0% non-contiguous), 1079/2048 blocks
 Exit status is 1
diff --git a/tests/f_miss_journal/expect.2 b/tests/f_miss_journal/expect.2
index 1e8c47f..ad32763 100644
--- a/tests/f_miss_journal/expect.2
+++ b/tests/f_miss_journal/expect.2
@@ -3,5 +3,5 @@ Pass 2: Checking directory structure
 Pass 3: Checking directory connectivity
 Pass 4: Checking reference counts
 Pass 5: Checking group summary information
-test_filesys: 11/256 files (0.0% non-contiguous), 1080/2048 blocks
+test_filesys: 11/256 files (0.0% non-contiguous), 1079/2048 blocks
 Exit status is 0
-- 
1.5.6.1.205.ge2c7.dirty

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists