From: Theodore Ts'o Date: Wed, 27 Aug 2008 20:23:30 +0000 (-0400) Subject: ext2fs_mkjournal(): Don't allocate an extra block to the journal X-Git-Tag: v1.41.1~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=674c0cc4cb137c6362cb1ae71b6db5cbccbad83a;p=thirdparty%2Fe2fsprogs.git ext2fs_mkjournal(): Don't allocate an extra block to the journal Addresses-Sourceforge-Bug: 1483791 Signed-off-by: "Theodore Ts'o" --- diff --git a/lib/ext2fs/mkjournal.c b/lib/ext2fs/mkjournal.c index e55dcbda7..3cae874be 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 0190bf2ab..d80da8952 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 35365fad4..3fbb8b35f 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 5a0bfef52..cd86fc410 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 632dc71bb..7c5070349 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 cad69f632..7d696f8e3 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 1e8c47f9e..ad327630e 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