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  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1259526809-23697-5-git-send-email-tytso@mit.edu>
Date:	Sun, 29 Nov 2009 15:33:29 -0500
From:	Theodore Ts'o <tytso@....edu>
To:	Ext4 Developers List <linux-ext4@...r.kernel.org>
Cc:	Theodore Ts'o <tytso@....edu>
Subject: [PATCH 5/5] e2fsck: Try to update on-disk bitmap in e2fsck_get_alloc_block() callback

The e2fsck_get_alloc_block() callback is used so that if the ext2fs
library needs to allocate blocks internally (most notably by the
extents functions), e2fsck's internal block usage map is consulted
since it is the only thing that can be trusted during a large part of
e2fsck's operation.

Change it to update the on-disk bitmap if it is loaded.  This reduces
the number of spurious differences found in pass #5.

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

diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c
index a241c23..0cb3fda 100644
--- a/e2fsck/pass1.c
+++ b/e2fsck/pass1.c
@@ -2628,6 +2628,10 @@ static errcode_t e2fsck_get_alloc_block(ext2_filsys fs, blk64_t goal,
 					  ctx->block_found_map, &new_block);
 		if (retval)
 			return retval;
+		if (fs->block_map) {
+			ext2fs_mark_block_bitmap(fs->block_map, new_block);
+			ext2fs_mark_bb_dirty(fs);
+		}
 	} else {
 		if (!fs->block_map) {
 			retval = ext2fs_read_block_bitmap(fs);
-- 
1.6.5.216.g5288a.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

Powered by Openwall GNU/*/Linux Powered by OpenVZ